Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure python tasks use 'python' #14

Open
st0ve opened this issue Jul 22, 2021 · 1 comment
Open

Azure python tasks use 'python' #14

st0ve opened this issue Jul 22, 2021 · 1 comment

Comments

@st0ve
Copy link

st0ve commented Jul 22, 2021

Python tasks in devops pipelines will use 'python' by default, however it looks like the PATH variable to the python executable is defined as 'python3', which causes the python tasks to fail

@gnadaban
Copy link
Contributor

As a quickfix, you can specify the pythonInterpreter for the PythonScript@0 task like so:

- task: PythonScript@0
  displayName: 'Run Data Deploy Script'
  pythonInterpreter:  '/usr/bin/python2'
  inputs:
    scriptSource: filePath
    scriptPath: scripts/${{ parameters.script_name }}.py
  ...

For Python3:

- task: PythonScript@0
  displayName: 'Run Data Deploy Script'
  pythonInterpreter:  '/usr/bin/python3'
  inputs:
    scriptSource: filePath
    scriptPath: scripts/${{ parameters.script_name }}.py
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants