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
wonky pth file breaks upgrade #2751
Comments
pip 1.5.4, trying with newer pip. |
still present in 6.1.1 |
|
this is trying to install pbr, which appears to be registered but isn't really there: its not in pip list. |
There is a /usr/local/lib/python2.7/dist-packages/oslo.config.egg-link file with one line in it |
And
|
removing both of those files allowed the install to proceed. I suspect ignoring the missing file would have been better? |
I think I just ran into the same issue here with pip 7.1.2: Am I doing something wrong? |
@rbtcollins It would be interesting to know how the initial package was installed ? @cdeil Sorry I'm not familiar with conda and even less on how it behaves/conflicts with pip but since the issue comes upgrading sphinx which comes from |
@asmeurer from conda – Maybe you know why conda and pip run into the issue mentioned in my last comment. |
I tried filing this as an anaconda bug, but @ilanschnell closed it as a setuptools/pip issue. I'm including a summary of the discussion here: Setup
The bug
Trying to Known workaroundsAdding the While using
A lot of pypi packages are not installable using None of these workarounds are good permanent solutions to this bug because:
CauseThe error message is correct, there is no easy-install.pth file in site-packages. The error occurs when pip tries to uninstall the old setuptools package, in pip/req/req_uninstall.py:160. The file pip is trying to remove (easy-install.pth) does not exist in a fresh Anaconda/Miniconda installation because no conda packages are able to include this file. This is a periodically sleeping bug, since it rears its head whenever the conda setuptools version (currently 18.8.1) lags behind the pip setuptools version (currently 19.1.1). |
Thanks for bringing this to my attention. I'm not sure what to do about it (from an Anaconda) perspective. The
I think that |
The assumption of easy-install.pth file is guarded by a check for .egg:
So my guess is that your conda package looks like an easy_install egg: this may confuse other tools as well. Perhaps don't do that? |
Correct, conda packages usually include |
No, you've misunderstood. .egg-info is not the same as .egg. The test I pasted is for "SOMETHING.egg", not "SOMETHING.egg-info". What you are doing with .egg-info files is probably correct (though I haven't read your code to authoritatively say so). |
@ilanschnell, are you still of the opinion that this is a setuptools/pip issue? |
`conda` ships with setuptools but lacks a corresponding easy-install.pth. Attempting to upgrade setuptools using `pip` fails because easy-install.pth is missing, despite the presentation of the conda-originating setuptools as an easy_install egg. It is a known bug of `conda` that is documented at the following: pypa/pip#2751 ContinuumIO/anaconda-issues#542
`conda` ships with setuptools but lacks a corresponding easy-install.pth. Attempting to upgrade setuptools using `pip` fails because easy-install.pth is missing, despite the presentation of the conda-originating setuptools as an easy_install egg. It is a known bug of `conda` that is documented at the following: pypa/pip#2751 ContinuumIO/anaconda-issues#542
`conda` ships with setuptools but lacks a corresponding easy-install.pth. Attempting to upgrade setuptools using `pip` fails because easy-install.pth is missing, despite the presentation of the conda-originating setuptools as an easy_install egg. It is a known bug of `conda` that is documented at the following: pypa/pip#2751 ContinuumIO/anaconda-issues#542
`conda` ships with setuptools but lacks a corresponding easy-install.pth. Attempting to upgrade setuptools using `pip` fails because easy-install.pth is missing, despite the presentation of the conda-originating setuptools as an easy_install egg. It is a known bug of `conda` that is documented at the following: pypa/pip#2751 ContinuumIO/anaconda-issues#542
This commit fixes the following error: ``` Collecting setuptools==19.4 Downloading setuptools-19.4-py2.py3-none-any.whl (471kB) Installing collected packages: setuptools Found existing installation: setuptools 26.1.1 Cannot remove entries from nonexistent file /build/miniconda/lib/python2.7/site-packages/easy-install.pth The command '/bin/sh -c cd $build_path && git clone git://github.com/girder/slicer_cli_web.git && cd slicer_cli_web && pip install -U -r requirements.txt && pip install -U setuptools==19.4' returned a non-zero code: 1 ``` Here are some more detailed copied from tulip-control/tulip-control@d6be896: `conda` ships with setuptools but lacks a corresponding easy-install.pth. Attempting to upgrade setuptools using `pip` fails because easy-install.pth is missing, despite the presentation of the conda-originating setuptools as an easy_install egg. It is a known bug of `conda` that is documented at the following: pypa/pip#2751 ContinuumIO/anaconda-issues#542
As suggested by @mivade: "Considering the target audience is likely using anaconda/miniconda, I would think the most sensible thing is to use the version used there as the minimum version. A quick check indicates that setuptools is at version 28.8 there, so I think requiring >=28.0.0 should work." See #212, pypa/pip#2751 and ContinuumIO/anaconda-issues#542 Suggested-by: "Michael V. DePalatis" <mike@depalatis.net>
FYI, there's activity over at the corresponding conda issue at ContinuumIO/anaconda-issues#542, but this is the general consensus over there:
|
If someone could provide steps to reproduce this issue, that'd be awesome! :) |
@pradyunsg I present a reliable way to reproduce it in the OP of the anaconda issue. It assumes you have conda installed. |
* Build docs using python3 * Work around a bug involving pip and setuptools: pypa/pip#2751
This seems straightforward, so I'll mark it as "awaiting PR". If a pth file does not exist, then it does not contain any entries so we shouldn't try to edit it. The error in question is raised here, which is invoked from One fix would be to simply check whether the incoming file exists in |
* Build docs using python3 * Work around a bug involving pip and setuptools: pypa/pip#2751
* Build docs using python3 * Work around a bug involving pip and setuptools: pypa/pip#2751
Since as part of #7891 , the |
I’m marking this as awaiting response. Please comment if the recently-released 20.1b1 still has this problem. Otherwise the bot will auto-close this after some time. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
The text was updated successfully, but these errors were encountered: