-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Can't download setuptools
#807
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
Comments
Could you confirm the virtualenv version that you used? The latest is |
I guess it was really late... I'm using |
Hello this is also happening to myself as well. So I tested this by removing my install of python from under my username folder (had a space) to under my C drive. Once you do this it should work for you @minchinweb . |
@efagerberg I think you're right. If I create a virtual environment with Python 3.4, activate it, and then try to run |
If it's helpful, here are the results of
|
For me, removing spaces fixes the problem. So the actual bug is in the code which processes paths. |
I found the bugs in the function install_wheel in virtualenv.py def install_wheel(project_names, py_executable, search_dirs=None):
if search_dirs is None:
search_dirs = file_search_dirs()
wheels = find_wheels(['setuptools', 'pip'], search_dirs)
pythonpath = os.pathsep.join(wheels)
findlinks = ' '.join(search_dirs)
cmd = [
py_executable, '-c',
'import sys, pip; sys.exit(pip.main(["install", "--ignore-installed"] + sys.argv[1:]))'
] + project_names
logger.start_progress('Installing %s...' % (', '.join(project_names)))
logger.indent += 2
try:
call_subprocess(cmd, show_stdout=False,
extra_env = {
'PYTHONPATH': pythonpath,
'JYTHONPATH': pythonpath, # for Jython < 3.x
'PIP_FIND_LINKS': findlinks,
'PIP_USE_WHEEL': '1',
'PIP_PRE': '1',
'PIP_NO_INDEX': '1'
}
)
finally:
logger.indent -= 2
logger.end_progress() findlinks = ' '.join(search_dirs) Here is the problem, search_dirs could include space, but they join search_dirs by space, OMG. My stupid solution is: extra_env = {
'PYTHONPATH': pythonpath,
'JYTHONPATH': pythonpath, # for Jython < 3.x
"PIP_INDEX_URL": "https://pypi.python.org/simple/",
"PIP_TRUSTED_HOST": "pypi.python.org",
# 'PIP_FIND_LINKS': findlinks,
'PIP_USE_WHEEL': '1',
# 'PIP_PRE': '1',
# 'PIP_NO_INDEX': '1'
} |
On Windows, when paths with a space are entered at the commandline, they have to be surrounded by quotes. I.e.
Does
|
I have tried, and failed again.So I |
Same problem here with Python 2.7 installed under
Workaround using Windows short path names (
So this approach would make it fixable without modifying There is already some short path using code in |
should be fixed now with #830 |
virtualenv
fails to create the virtual environment as it seems unable to findsetuptools
to download an install in.Python 3.5.0, system install, WIndows 10, virtualenv
1.3.213.1.2virtualenv
works as expected on the same machine using Python 3.4.3.This is the output:
The text was updated successfully, but these errors were encountered: