-
Notifications
You must be signed in to change notification settings - Fork 520
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
ERROR: Cannot uninstall 'PyYAML' #349
Comments
Also running into this issue working with conda environments that install some dependencies via pip. |
I think the problem presents itself on conda when you have a conda dependency that uses pyyaml, and a pip dependency that also uses pyyaml. For anyone else having this particular problem, in my case I managed to solve it by adding |
I'm not sure if this is actually what's going on. I believe that even if Not that I disagree that distutils should be removed altogether... |
On Friday, June 5, 2020 2:04:34 PM EDT Brad Solomon wrote:
I believe that even if `setup.py` calls `distutils.setup()`, recent versions
of `pip` will actually monkey-patch that to replace it with
`setuptools.setup()` if setuptools is available.
That's correct. There are projects that rely on this behavior.
|
So I think when distutils would come into play is if the user is installing via |
pyyaml packaged with distutils is strangely observed on ubuntu arm64 images, but not amd64. What could be the reason? I can confirm that's very annoying to see builds failing without any sensible way to remove existing package |
can we please get this resolved? ubuntu 20.04 amd64 - creates trouble for pip |
If you're still seeing this, it's likely because of the way Ubuntu/Debian are packaging it or you're using stale packages. Trying to use pip to manage packages installed by the OS is not going to end well, for a lot of reasons (which is why pip removed the ability to do so quite awhile back). You'll need to either install to a user location or a virtualenv, or uninstall the OS pyyaml package using the OS package manager. Pyyaml itself completely switched to setuptools nearly a year ago with the 5.4 release. |
Some Ubuntu 20.04 images come with PyYAML 5.3.1 pre-installed through distutils. This makes pip very angry. See yaml/pyyaml#349. Since older versions of PyYAML should work for mlir, relax the version requirement to ease developer setup. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D143523
Some Ubuntu 20.04 images come with PyYAML 5.3.1 pre-installed through distutils. This makes pip very angry. See yaml/pyyaml#349. Since older versions of PyYAML should work for mlir, relax the version requirement to ease developer setup. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D143523
Some Ubuntu 20.04 images come with PyYAML 5.3.1 pre-installed through distutils. This makes pip very angry. See yaml/pyyaml#349. Since older versions of PyYAML should work for mlir, relax the version requirement to ease developer setup. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D143523
Some Ubuntu 20.04 images come with PyYAML 5.3.1 pre-installed through distutils. This makes pip very angry. See yaml/pyyaml#349. Since older versions of PyYAML should work for mlir, relax the version requirement to ease developer setup. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D143523
Distributing PyYAML via
distutils
is decidedly user hostile. Pip cannot cleanly remove existing PyYAML distributions. There are many situations where users need the ability to upgrade to a modern version of pyyaml, but a version is already installed (For example, AWS AMI distributions).I strongly recommend that future versions of PyYAML distribute via
setuputils
instead.The text was updated successfully, but these errors were encountered: