Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upNo module named azure in pyvenv #3989
Comments
troydai
added
the
Packaging
label
Jul 7, 2017
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
What Python path does that refer to? Also, does This may be to do with the code in https://github.com/Azure/azure-cli/blob/master/src/azure-cli/az. |
This comment has been minimized.
This comment has been minimized.
The @jaraco you expect this work, so I assume there are precedents of other PIP installed applications to be aware of its virtual environment. Could you please point us to an example? |
This comment has been minimized.
This comment has been minimized.
I have
Python 3.6 is the stock python.org Python 3.6.1. The only installation of the Azure CLI is in that virtualenv, so it's not installed to
Yes, almost certainly. I wonder if the invocation should be |
This comment has been minimized.
This comment has been minimized.
Using
|
derekbekoe
added
the
Packaging/Pip
label
Sep 28, 2017
This comment has been minimized.
This comment has been minimized.
I have both python and python3 environments installed. Chose toinstall azure-cli to python3. Even if you have alias pointing python to python3 did not help. The command $ cat $(which az) @derekbekoe pointed out solved the issue. In my case I edit the az file as simply changing the python in the last line to python3:
python3 above will automatically point to /usr/bin/python3 and solved the issue. |
danielhelfand
referenced this issue
Mar 14, 2018
Closed
Question: Using pip to install CLI to Specific Directory #5803
derekbekoe
referenced this issue
Apr 19, 2018
Closed
az long running operations never complete #3472
willmerae
referenced this issue
Nov 5, 2018
Merged
Revert "Use setuptools entry_points for az executable" #1042
tjprescott
added this to Triage
in Packaging and Release Process
via automation
Nov 14, 2018
tjprescott
moved this from Triage
to Low Priority
in Packaging and Release Process
Nov 14, 2018
tjprescott
removed
the
Packaging
label
Nov 14, 2018
chaudum
referenced this issue
Jan 9, 2019
Closed
convert az bash script into console entry point #8208
This comment has been minimized.
This comment has been minimized.
pedrohdz
commented
Feb 9, 2019
Per the distutils documentation:
So So @jaraco's solution is the best work around at the moment. This is the only Python package I have come across that has this problem. Maybe some extra logic in |
jaraco commentedJul 7, 2017
Description
Installing azure-cli to a Python 3 venv produces invalid
az
command.Whatever magic the az script is attempting to do is apparently not detecting the virtual environment and is instead invoking an old Python from a different environment where azure is not installed.
It's possible this installation method isn't supported, but as a Python engineer, I would have expected it to work.
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: pip
CLI Version: What version of the CLI and modules are installed? (Use
az --version
)Answer here: 2.0.10
OS Version: What OS and version are you using?
Answer here: macOS 10.12.5
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: zsh