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

Can't Pip Upgrade. #210

Closed
drcrook1 opened this issue Jul 31, 2018 · 6 comments
Closed

Can't Pip Upgrade. #210

drcrook1 opened this issue Jul 31, 2018 · 6 comments

Comments

@drcrook1
Copy link

C:\WINDOWS\system32>pip install PyYAML --upgrade
Collecting PyYAML
Using cached https://files.pythonhosted.org/packages/4f/ca/5fad249c5032270540c24d2189b0ddf1396aac49b0bdc548162edcf14131/PyYAML-3.13-cp36-cp36m-win_amd64.whl
azure-cli-appservice 0.1.31 has requirement azure-mgmt-containerregistry==1.0.1, but you'll have azure-mgmt-containerregistry 2.1.0 which is incompatible.
azure-cli-acr 2.0.23 has requirement azure-mgmt-containerregistry==1.0.1, but you'll have azure-mgmt-containerregistry 2.1.0 which is incompatible.
Installing collected packages: PyYAML
Found existing installation: PyYAML 3.12
Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

It would be great to have this resolved. Feel free to close if this is already solved. It would be good to have advise on how to upgrade.

@The-Compiler
Copy link
Contributor

This looks more like an issue with your setup rather than PyYAML: The existing installation was installed with distutils and not pip, so pip doesn't know how to uninstall it.

@Ralnoc
Copy link

Ralnoc commented Mar 8, 2019

@The-Compiler -
Packages that directly implement distutils are no longer supported when attempting to uninstall in pip. (pypa/pip#5247) Additionally, the Python Software Foundation recommends that modules not leverage distutils directly, but instead use the cross-version tools developed by PYPA (specifically setuptools) https://docs.python.org/3/library/distutils.html

As a heavily used library, it is highly recommended that it be moved onto setuptools. This is going to continue to be an issue and will likely become a larger one in the future.

@webknjaz
Copy link

are no longer supported

Moreover, it wasn't really supported earlier as well. It's just that it stopped lying about being able to track package files for removal :)

@Ralnoc
Copy link

Ralnoc commented Sep 3, 2020

@The-Compiler -
As of setuptools 50.0.0 , not to mention the planned path for pip and setuptools, this is becoming a much bigger issue. When will setup.py be updated to leverage the current implementations for setuptools and stop leveraging distutils? This still ends up causing a lot of problems when it involves upgrading the version of pyyaml.

@The-Compiler
Copy link
Contributor

@Ralnoc Note I'm not involved with PyYAML (other than contributing a deprecation warning fix), so I can't answer those questions.

@nitzmahone
Copy link
Member

Closing this one. The original issue is unrelated to the internals of the current setup.py or pip- likely the original package was installed with easy_install, which modern versions of pip will refuse to remove. The necessary packaging changes will happen eventually, but it's not a slam-dunk for this project to go 100% native setuptools or PEP517 today, and whatever we do will likely destabilize things that have relied on this stuff working the way it has for a very long time.

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

5 participants