1

Closed

Install package with easy_install doesn't work due to long paths?

description

If I create a project in the default location (documents/visual studio...) then easy_install in my virtual env fails. This is true from PTVS or command line. If I create my project in a shorter path, I'm not seeing the issue.

However, from command line, if I use python -m easy_install mypackagename then it works even with long path.

Is the PTVS Install Package feature using easy_install.exe or python.exe -m easy_install ?

Example error (shows trying to install an .exe, but same error for regular package name such as azure):
C:\Users\huvalo\Documents\Visual Studio 2013\Projects\PyvotProgram1\PyvotProgram1\env\Scripts>easy_i
nstall.exe pywin32-219.win32-py2.7.exe
Fatal error in launcher: Unable to create process using '""c:\users\huvalo\documents\visual studio 2
013\Projects\PyvotProgram1\PyvotProgram1\env\Scripts\python.exe"" "C:\Users\huvalo\Documents\Visual
Studio 2013\Projects\PyvotProgram1\PyvotProgram1\env\Scripts\easy_install.exe" pywin32-219.win32-py2
.7.exe'

C:\Users\huvalo\Documents\Visual Studio 2013\Projects\PyvotProgram1\PyvotProgram1\env\Scripts>

comments

Zooba wrote Jun 3 at 11:26 PM

You may be looking at a setuptools bug. Unless there's a file alongside easy_install.exe named easy_install-script.py then we're just launching the launcher directly.

I suspect the problem is the double quoting around the path to python.exe, but I'm not sure where it came from.

If you open easy_install.exe in Notepad, you should see a shebang line near the end of the file. I suspect it will be quoted, but it shouldn't be. If it is, I'll file something for setuptools. (See if pip has the same problem.)

Zooba wrote Jun 3 at 11:27 PM

Pip may not have the same problem from PTVS because we go straight to "-m pip" (or '-c "import pip; pip.main()"' for older Pythons). But the pip.exe launcher may have the same issue.

Zooba wrote Jun 3 at 11:42 PM

I've repro'd this with the latest setuptools, so I'm reporting it to them.

huguesv wrote Jun 3 at 11:44 PM

virtual env in a path with spaces:
pip.exe and easy_install.exe both have the path to python.exe in double-quotes
pip works, easy_install doesn't

virtual env in a path without spaces:
pip.exe and easy_install.exe both have the path to python.exe NOT in double-quotes

huguesv wrote Jun 3 at 11:45 PM

This is tested with virtual env 1.11.6 for Python 2.7