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
pip install --upgrade azure-cli
fails on Cygwin due to psutil
#9399
Comments
@adewaleo, the |
Weirdly enough I uninstalled all traces of the |
Also it seems I can't even install an older version any more as the
|
@ElvenSpellmaker, Yes, unfortunately it turns out that psutil does not support cygwin yet. This is sad as it makes it very easy for az feedback to detect the shell the cli command was executed in. This sprint, I will remove it as a dependency and try to find other ways to detect what shell a user is running. I am not sure how to detect for certain that a command was executed from powershell aside from checking that the grandparent process was indeed powershell.exe For now there are two workarounds that come to mind:
|
Unfortunately as I've stated above, it's a dependency that tries to install the psutil and so I can't install an older version even! =( |
installing 2.0.50 should solve the problem as a work around. az feedback only started using psutil recently. We didn't always have this dependency. I was wrong to ask you to install 2.0.62, the change was made 4 or so sprints ago. |
Unfortunately installing older versions has the same effect, it always tries to pull in psutil
|
Not the same error, but related to psutil with a Docker build regardless of using 2.0.46 or 2.0.65 This is there because building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/psutil
gcc -pthread -B /usr/local/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=562 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_common.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for psutil
Running setup.py clean for psutil
Successfully built vsts-cd-manager sshtunnel pydocumentdb pyyaml pyperclip tabulate antlr4-python3-runtime
Failed to build psutil |
What docker file are you using to build the docker image? Are you using the one in our repo? There was an added dependency when psutil was aded to our repo. |
In our dockerfile, I had to add the linux-headers dependency for psutil to work. There might be a similar case where you need to include (a dependency) with gcc in your docker file see the following for more info: giampaolo/psutil#1143 |
Hey @ElvenSpellmaker can you try running pip install -r requirements.py3.windows.txt, but remove psutil's dependency from the file beforehand. This should be a work around for cygwin. Psutil is only used in feedback. I could modify Let me know if it works |
I will be closing this issue as there is a workaround |
@adewaleo Hey, sorry for my late response, I get this error when using the requirements for Python 2: I'm wondering if I can just remove that too |
I could install it via virtualenv. But where is the installation than. How can I start it after : |
If you're in the virtual env you should be able to type Each terminal window will need that virtualenv |
I have to start it directly within the installed directory with a './az'. Else it does not work. I tried to link the file to /usr/bin/az, but then it fails No module named 'fabric' |
Probably i failed with this virtualenv as I even dont know what it is |
Virtualenv is a virtual environment (see https://docs.python.org/3/library/venv.html), rather than installing modules globally you install them to a separate directory, kind of like how PHP's EDIT:
|
Which command I have to execute to do this virtualenv thing correctly? |
|
$ python3 -m venv env $ echo $PATH and the az binary resides in |
Now try |
$ azdev setup -c . =======================
|
It should reside in |
Yes and that seems to be the problem... |
@ElvenSpellmaker thanks a lot for helping out @lweberru |
So whatever I do, the binaries are always inside I also tried to mv or copy the files out of /home/lukas/AzureCliInstall/azure-cli/src/azure-cli/ to the virtual env but that also fails. Any idea? |
my commands are then i test with a single "az" |
But even more relevant is, that the command az itself does not work: The command failed with an unexpected error. Here is the traceback: No module named 'fabric' only "az login" works |
does pip list / freeze include |
No it does not. Can I install it seperatly? |
I installed fabric via "pip install fabric" and now I get: I installed that module as well. This is than followed by the next and next and next module, which is missing... |
You can but the point of running |
I think the first thing to work out is why it's building to |
after azdev setup, within a virtual env, you should be able to run What does your path show in the virtualenv. It should be prefixed by the path to the binaries in your virtualenv after activating it. On my mac It shows:
|
after #11665 has been merged it is possible to install latest azure-cli in cygwin |
That's great news, let's hope it makes a release soon! @avoidik Could you update this issue when it makes a release please? |
@ElvenSpellmaker it is already in there
|
Thanks! |
Describe the bug
I tried to upgrade
azure-cli
from 2.0.31 to the latest (2.0.62 as of writing)To Reproduce
pip install --upgrade azure-cli
Expected behavior
az should upgrade.
Environment summary
Windows 10
Cygwin (latest)
Additional context
The text was updated successfully, but these errors were encountered: