Why does pip fail when installing local egg repository?
Asked Answered
B

2

16

I am working on Windows 7.I have created a python egg using distutils. Now I try to install this egg in a virtual environment using pip 1.0.2 using the following command:

Then I create a virtual environment myVirtualEnv I activate it using activate.bat then execute the following command:

pip install path_to_my_local_folder#eggName

This creates a copy of my egg in my myVirtualEnv\build directory but I have the following error:

IOError: [Errno 2] No such file or directory: path_of_my_virtualEnv\build\PyEqdR\setup.py

Do you know why pip is looking for the setup.py file. Should I include it in the egg ?

Bisexual answered 20/9, 2011 at 17:55 Comment(0)
W
31

http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install

pip doesn’t do everything that easy_install does. Specifically:

It cannot install from eggs. It only installs from source.

Wile answered 20/9, 2011 at 19:50 Comment(2)
Related: Why use pip over easy_install?Unschooled
Is this no longer the case with newer pip?Peshitta
R
2

I just came across this page and since I had the same exact problem, I thought to post the solution that worked for me.

This is an issue with the older versions of pip. My version of pip was 1.5.4. I was not able to find the first version of pip that was able to do it but the current version 6.0.6 does the job.

To update to latest pip version, simply run the following command:

pip install --upgrade pip

Needless to say if you want this to only take effect inside your virtual environment, run it inside the environment. Otherwise, run it globally.

Roentgenograph answered 9/1, 2015 at 18:31 Comment(1)
@oktay I get the same error even after updating the pip. Could you helpBureau

© 2022 - 2024 — McMap. All rights reserved.