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
Homebrew: "Python location" not pointing to a virtual environment #4573
Comments
The output:
|
Based on feedback in my Homebrew PR, the Homebrew install does not use a virtual environment. Instead, the PYTHONPATH is set to the correct site-packages directory manually (which is what the virtual env would have done).
|
Not sure how to work around this from our side. Maybe you could add "Python path: '/usr/local/Cellar/.../site-packages'" to the output of |
That would return a list of values rather than a single one.
If you add the correct path to your PYTHONPATH, does the VSCode extension work as normal? |
It complains
Still trying to figure out how to get around it. |
@derekbekoe I see |
@chrmarti Did the VS Code extension load and run properly after adding the Python path? |
@derekbekoe No, it shows the above error about not finding |
What version of Python are you using? I see Really just running this should work as that's what
|
You're right, the 'Python location' points to Python 3.5. It works with Python 3.6. |
@derekbekoe Anything else I should try? Is the homebrew package installing 3.6 packages when using the installed python 3.5 at fault? |
Yes it does. |
That is causing the problem then? I'm trying to understand what I can do. |
Had a similar problem with homebrew installed az. Python 3.6 was installed but not linked correctly by homebrew. The problem was fixed by doing brew link --overwrite python3 |
I will submit a PR to https://github.com/Microsoft/vscode-azurecli with a fix shortly. |
Description
"Python location" was added to the output of
--version
for the VSCode extension to pick up and use as the entry point for loading the command tree, documentation and completion proposals (#2986). That depends on "Python location" pointing to a virtual environment with all the CLI's modules in it. When installing on Mac through Homebrew that is not the case and the VSCode extension does not work.Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: Homebrew on Mac
CLI Version: What version of the CLI and modules are installed? (Use
az --version
)Answer here: 2.0.18
OS Version: What OS and version are you using?
Answer here: Mac OS Sierra
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: zsh
/cc @derekbekoe @chrisdias
The text was updated successfully, but these errors were encountered: