Virtualenv: crash with Python 3.3 on Arch Linux

Created on 18 Mar 2016  ·  3Comments  ·  Source: pypa/virtualenv

If I install Python 3.3 from the Arch Linux AUR and then try to open a virtualenv, I get this crash:

$ virtualenv -p python3.3 /tmp/foo
Running virtualenv with interpreter /usr/bin/python3.3
Using base prefix '/usr'
New python executable in /tmp/foo/bin/python3.3
Also creating executable in /tmp/foo/bin/python
Installing setuptools, pip, wheel...
  Complete output from command /tmp/foo/bin/python3.3 - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
  File "/usr/lib/python3.5/site-packages/virtualenv_support/pip-8.1.0-py2.py3-none-any.whl/pip/__init__.py", line 15, in <module>
  File "/usr/lib/python3.5/site-packages/virtualenv_support/pip-8.1.0-py2.py3-none-any.whl/pip/vcs/subversion.py", line 9, in <module>
  File "/usr/lib/python3.5/site-packages/virtualenv_support/pip-8.1.0-py2.py3-none-any.whl/pip/index.py", line 30, in <module>
  File "/usr/lib/python3.5/site-packages/virtualenv_support/pip-8.1.0-py2.py3-none-any.whl/pip/wheel.py", line 39, in <module>
  File "/usr/lib/python3.5/site-packages/virtualenv_support/pip-8.1.0-py2.py3-none-any.whl/pip/_vendor/distlib/scripts.py", line 14, in <module>
  File "/usr/lib/python3.5/site-packages/virtualenv_support/pip-8.1.0-py2.py3-none-any.whl/pip/_vendor/distlib/compat.py", line 66, in <module>
ImportError: cannot import name HTTPSHandler
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/virtualenv.py", line 2311, in <module>
    main()
  File "/usr/lib/python3.5/site-packages/virtualenv.py", line 703, in main
    symlink=options.symlink)
  File "/usr/lib/python3.5/site-packages/virtualenv.py", line 936, in create_environment
    download=download,
  File "/usr/lib/python3.5/site-packages/virtualenv.py", line 892, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/lib/python3.5/site-packages/virtualenv.py", line 787, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /tmp/foo/bin/python3.3 - setuptools pip wheel failed with error code 1

There's some discussion in the comments on that AUR package about different build flags related to SSL. I get the impression that the package itself needs to be fixed somehow, so this crash is not virtualenv's fault. However, it would be nice if virtualenv was aware of this potential error, and was able to print a helpful message. Something like "The SomethingSomething package is missing, probably because your version of Python was built without BlahBlahSSL. Virtualenv doens't support that."

Most helpful comment

Should be fixed by https://bitbucket.org/pypa/distlib/commits/a258e3bdd6f8205f3815e173a55ffe857e743995.

UPDATE 2018/01/20: fixed in distlib 0.2.4, pip 9.0.0 (https://github.com/pypa/pip/commit/c8e8a99b7a6f9404536bc9d895a1a42a060f7f91), and landed in virtualenv 15.1.0 (https://github.com/pypa/virtualenv/pull/972/commits/e944bdc384759c27662b8ffd9264367d569376ee)

All 3 comments

I've got exactly the same error as @oconnor663 described with Python 3.4 installed from Arch Linux AUR (current/default version of Python is 3.5).
I've tried to install virtualenv directly from Arch Linux repo and using 'pip', but in both cases the same error is reported.
Here is command:
$ virtualenv -p /usr/bin/python3.4 python34virtEnv

Should be fixed by https://bitbucket.org/pypa/distlib/commits/a258e3bdd6f8205f3815e173a55ffe857e743995.

UPDATE 2018/01/20: fixed in distlib 0.2.4, pip 9.0.0 (https://github.com/pypa/pip/commit/c8e8a99b7a6f9404536bc9d895a1a42a060f7f91), and landed in virtualenv 15.1.0 (https://github.com/pypa/virtualenv/pull/972/commits/e944bdc384759c27662b8ffd9264367d569376ee)

This is old issue can be closed now because EOL Python 3.3 was dropped n https://github.com/pypa/virtualenv/pull/1089.

Was this page helpful?
0 / 5 - 0 ratings