Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find file setuptools-27.2.0-py3.5.egg

This question is for Python 3.5.2, using Anaconda 4.3.0 on Windows 10 (64-bit)

When I try to install packages with pip I get this error:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\HMGSYS\AppData\Local\Temp\pip-build-xit1wtvr\shapely\

Based on other SO answers, I tried to upgrade setuptools:

pip install --upgrade setuptools

But I get this error:

FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\HMGSYS\\Anaconda3\\lib\\site-packages\\setuptools-27.2.0-py3.5.egg'

However, if I try to install setuptools:

python -m pip install -U pip setuptools

It tells me that all packages are up to date, including setuptools:

Requirement already up-to-date: setuptools in c:\users\hmgsys\anaconda3\lib\site-packages

Also, when I look in lib\site-packages, I see a folder for setuptools and another for setuptools-34.3.2.dist-info.

What should I try next? Why is setuptools looking for version 27.2.0 and ignoring the more recent versions?

EDIT:

I downloaded the specific version of setuptools that the system was looking for and the error from 'pip install --upgrade setuptools' disappeared. However, I'm still getting the first 'egg_info' error. I've also installed ez_setup, which had no effect.

like image 573
jss367 Avatar asked Mar 13 '17 01:03

jss367


2 Answers

Try to use conda to update setuptools:

conda update setuptools

like image 113
Shaohan Huang Avatar answered Sep 29 '22 13:09

Shaohan Huang


You may try to downgrade your python into python 3.5.0.

conda install python=3.5.0

( I had encountered the same error with python 3.5.3, and it installed without error after downgraded to 3.5.0.)

like image 39
Pei CH Avatar answered Sep 29 '22 12:09

Pei CH