Skip to content
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

Cannot create a virtualenv with a trailing space in the name #749

Closed
jessamynsmith opened this issue Apr 26, 2015 · 4 comments
Closed

Cannot create a virtualenv with a trailing space in the name #749

jessamynsmith opened this issue Apr 26, 2015 · 4 comments

Comments

@jessamynsmith
Copy link

First off, I think that creating directories with leading or trailing spaces in the name is a terrible thing to do, but it is legal in most operating systems. In Mac OSX I am able to create a virtualenv named " space ", but on linux it fails as follows:

$ virtualenv "trailing space "
New python executable in trailing space /bin/python
ERROR: The executable trailing space /bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/vagrant/trailing space' (should be u'/home/vagrant/trailing space ')
ERROR: virtualenv is not compatible with this system or executable

I only discovered this because I was writing tests for virtualenvwrapper and trying to handle edge cases. I do not think it is particularly high priority, but I wanted to record it for posterity.

@wsanchez
Copy link

See also #53

@stale
Copy link

stale bot commented Jan 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 14, 2019
@wsanchez
Copy link

Seems to work now:

[/tmp] wsanchez$ ./venv/bin/python -V
Python 3.7.1
[/tmp] wsanchez$ ./venv/bin/virtualenv --version
16.2.0
[/tmp] wsanchez$ ./venv/bin/virtualenv "blah "
Using real prefix '/Library/Frameworks/Python.framework/Versions/3.7'
New python executable in /private/tmp/blah /bin/python3.7
Also creating executable in /private/tmp/blah /bin/python
Installing setuptools, pip, wheel...
done.
[/tmp] wsanchez$ ./blah\ /bin/pip install tox
Collecting tox
...
Successfully installed filelock-3.0.10 pluggy-0.8.1 py-1.7.0 six-1.12.0 toml-0.10.0 tox-3.7.0 virtualenv-16.2.0
[/tmp] wsanchez$ ./blah\ /bin/tox --version
3.7.0 imported from /private/tmp/blah /lib/python3.7/site-packages/tox/__init__.py
[/tmp] wsanchez$ 

@stale stale bot removed the wontfix label Jan 14, 2019
@gaborbernat
Copy link
Contributor

Thanks,
thanks

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants