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

PIP_FIND_LINKS doesn't cope with spaces, work around with file:// URLs. #830

Merged
merged 1 commit into from
Jan 19, 2016

Conversation

kankri
Copy link

@kankri kankri commented Dec 10, 2015

Ever since I upgraded virtualenv I have been unable to use it. Similar problems have been reported in #524 and #807. It turns out the problem is caused by virtualenv using pip to install setuptools, pip and wheel in the virtual environment. It uses the PIP_FIND_LINKS environment variable to direct pip to find the tools from the virtualenv installation.

PIP_FIND_LINKS can contain multiple space-separated paths or URL links. Because of that, none of the links can contain spaces. However, if virtualenv is installed to a path containing spaces, PIP_FIND_LINKS would have to contain a path with spaces, e.g.:

/home/kankri/.local/lib/python 2.7/site-packages

To work around this pip limitation, local paths can be converted to file:// URLs which don't have any literal spaces. The conversion is done only for paths actually containing spaces.

There is an alternative PR in #823. I think it's less elegant, more complex and solves the problem only for Windows users, and only for those Windows users who have short-name generation enabled. However, the root problem is not OS specific.

dstufft added a commit that referenced this pull request Jan 19, 2016
PIP_FIND_LINKS doesn't cope with spaces, work around with file:// URLs.
@dstufft dstufft merged commit 9225d2b into pypa:develop Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants