pypa/virtualenv

can’t create a venv with spaces in the name

merwok opened this issue · 4 comments

Traceback says it all:

$ virtualenv "test with space"
Using real prefix '/usr'
New python executable in test with space/bin/python
Installing distribute..............................................................................................................................................................................................done.
Installing pip...
Error [Errno 2] No such file or directory while executing command "/tmp/user/1013/test ...ace/bin/easy_install" /home/wok/.usr/local...pport/pip-1.1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
File "/home/wok/.usr/bin/virtualenv", line 9, in
load_entry_point('virtualenv==1.7.1.2', 'console_scripts', 'virtualenv')()
File "/home/wok/.usr/local/lib/python2.7/site-packages/virtualenv.py", line 928, in main
never_download=options.never_download)
File "/home/wok/.usr/local/lib/python2.7/site-packages/virtualenv.py", line 1042, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/home/wok/.usr/local/lib/python2.7/site-packages/virtualenv.py", line 640, in install_pip
filter_stdout=_filter_setup)
File "/home/wok/.usr/local/lib/python2.7/site-packages/virtualenv.py", line 966, in call_subprocess
cwd=cwd, env=env)
File "/usr/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

See also issue #53 (possible duplicate).

Closing as it's indeed a duplicate.

Wasn't a duplicate. This bug here is actually fixed as it is now possible (at least 1.8.4) to create a virtualenv with a space. However easy_install fails in there, so does pip:

% virtualenv "foo bar"
New python executable in foo bar/bin/python
Installing setuptools............done.
Installing pip...............done.
% ./foo\ bar/bin/easy_install nose
zsh: ./foo bar/bin/easy_install: bad interpreter: "/tmp/cfl/foo: no such file or directory
127 % ./foo\ bar/bin/pip install nose 
zsh: ./foo bar/bin/pip: bad interpreter: "/tmp/cfl/foo: no such file or directory