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 -U setuptools fails in fresh conda environment #542
Comments
Thank you for the report, I just hit the same issue and could solve it using the |
I'd recommend you to not upgrade I think that was decided to avoid |
Thank you for your reply, ccordoba12. The problem with the "then don't do that" advice is that this bug also hits you if you try to upgrade a package that depends on setuptools. For example:
To try to figure out how big a problem this is, I downloaded the file pypi-deps.csv.lzma from here, and it showed that at the time that data was compiled in 2013, 1822 pypi packages depended on setuptools, and a further 41 depended on one of those 1822 packages. That data is used in this zoomable graph of pypi dependencies. Setuptools is the red dot in the middle of the biggest blob. It seems like no other package is depended on as much as setuptools. I can totally understand not wanting to mess with |
Pinging @ilanschnell about this one. |
Use conda to update setuptools:
Using pip, I get the same error:
The file pip is trying to remove ( |
@kalefranz Can you look at this? It's still an issue (as seen on the mailing list) It's tied to this issue over at pip: pypa/pip#2751 (comment)
It's true. The conda package for setuptools installs an egg. |
this worked for me perfectly on Windows (original recipe for OSX): tensorflow/tensorflow#135 (comment)
|
`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
The --ignore-installed helped to get past the error for upgrading to iPython 5.0. I was getting the following error when running pip install ipython --upgrade Installing collected packages: setuptools, traitlets, ipython Thanks! |
Please consider reopening this bug, or at least responding to pypa/pip#2751 which awaits an answer from you guys. This problem is not going away, and there is a constant stream of references from other projects who have this problem, both here and at pypa/pip#2751. And that's only the tip of the iceberg, those that do not just find this workaround and apply it without telling us about it. First step to solving this problem is that you guys and the pip guys must determine whose problem it is. :-) To bring you up to speed on where things stand I'll give you a summary. @rbtcollins pointed out that...
To which @ilanschnell answered:
And @rbtcollins replied:
So. Could you perhaps make setuptools look more like the pip setuptools by making it a normal package instead of an egg? Would that be an acceptable solution? |
`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
Can we have an update on this? This bg break tons of packages making impossible to deploy anything on conda. Every day I find another case where I reach the infamous:
Here is a very simple way to replicate the problem
|
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
An update on this would be nice. I just hit this as well. |
I'm going ahead and writing a little patch for pip which creates an empty |
Thank you @ilanschnell ! |
I've added a patch (https://github.com/ContinuumIO/anaconda-recipes/blob/master/pip/ensure_easy_pth.patch) to pip, and build new packages ( |
It's not entirely clear to me that this is the case. As best I can tell pip will only care about an |
as recommended by ContinuumIO/anaconda-issues#542 (comment)
* The conda environment on readthedocs.org could successfully build the static docs, but failed to build the code-level docs b/c of missing dependencies. This commit adds the dependencies from requirements.txt to the pip section of conda's environment.yml. * setuptools had to be removed from the pip section of environment.yml because conda has issues with installing setuptools via pip. See: ContinuumIO/anaconda-issues#542 Instead, use conda's provided setuptools. * Removed extraneous dependencies
Trying to install Kivy (Python framework) on Windows 10 from the VS Command prompt (as admin).
I see that ilanschnell created a patch for this problem, but I am unsure which directory I should place this patch in. Can someone please advise. |
please help me to solve my problem and instal anaconda again and use it |
@fmelectrical your issue is not related to this thread at all. |
@ilanschnell I get this error instead with the latest build of pip:
Is it the same you got? |
* The conda environment on readthedocs.org could successfully build the static docs, but failed to build the code-level docs b/c of missing dependencies. This commit adds the dependencies from requirements.txt to the pip section of conda's environment.yml. * setuptools had to be removed from the pip section of environment.yml because conda has issues with installing setuptools via pip. See: ContinuumIO/anaconda-issues#542 Instead, use conda's provided setuptools. * Removed extraneous dependencies
@niklasholm
|
this can be resolved if you do conda install setuptools |
as recommended by ContinuumIO/anaconda-issues#542 (comment)
as recommended by ContinuumIO/anaconda-issues#542 (comment)
This should fix a specific build failure (to all current failures unfortunately) Add --ignore-installed in next line because of failures like in https://ci.appveyor.com/project/NLeSC/mcfly/builds/26750694/job/1klik02e6464okfc for which the used fix is suggested here: ContinuumIO/anaconda-issues#542.
Conda's astroquery depends on keyring which comes with secretstorage v2.3 but keyring's metadata declares a dependency on secretstorage>3. And then pip tries to update secretstorage and fails because of an old issue between pip and conda (ContinuumIO/anaconda-issues#542).
Setup:
The bug:
Trying to
install -U
any package depending on setuptools also fails with the same error.Known workarounds:
--ignore-installed
option will sucessfully upgrade setuptools and the problem will be solved for the lifetime of that particular conda environment.The error message is correct, there is no
easy-install.pth
file insite-packages
. The error occurs when pip tries to uninstall the old setuptools package, in pip/req/req_uninstall.py:160.The second workaround will create the missing pth file, while the first will not, but in both cases everything seems to work afterwards.
I am unsure if this is a pip issue or a conda issue, but because it is your setuptools build that makes pip choke, I choose to submit it here.
The text was updated successfully, but these errors were encountered: