Virtualenv: Absturz mit Python 3.3 unter Arch Linux

Erstellt am 18. März 2016  ·  3Kommentare  ·  Quelle: pypa/virtualenv

Wenn ich Python 3.3 vom Arch Linux AUR installiere und dann versuche, eine Virtualenv zu öffnen, bekomme ich diesen Absturz:

$ 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

In den Kommentaren zu diesem AUR-Paket gibt es einige Diskussionen über verschiedene Build-Flags im Zusammenhang mit SSL. Ich habe den Eindruck, dass das Paket selbst irgendwie repariert werden muss, also ist dieser Absturz nicht die Schuld von virtualenv. Es wäre jedoch schön, wenn virtualenv diesen potenziellen Fehler kennt und eine hilfreiche Nachricht ausgeben könnte. Etwas wie "Das SomethingSomething-Paket fehlt, wahrscheinlich weil Ihre Version von Python ohne BlahBlahSSL erstellt wurde. Virtualenv unterstützt das nicht."

Hilfreichster Kommentar

Sollte durch https://bitbucket.org/pypa/distlib/commits/a258e3bdd6f8205f3815e173a55ffe857e743995 behoben werden

UPDATE 20.01.2018: behoben in distlib 0.2.4, pip 9.0.0 (https://github.com/pypa/pip/commit/c8e8a99b7a6f9404536bc9d895a1a42a060f7f91) und landete in virtualenv 15.1.0 (https://github. com/pypa/virtualenv/pull/972/commits/e944bdc384759c27662b8ffd9264367d569376ee)

Alle 3 Kommentare

Ich habe genau den gleichen Fehler wie @oconnor663 , der mit Python 3.4 beschrieben wurde, das von Arch Linux AUR installiert wurde (aktuelle / Standardversion von Python ist 3.5).
Ich habe versucht, virtualenv direkt aus dem Arch Linux-Repository und mit 'pip' zu installieren, aber in beiden Fällen wird der gleiche Fehler gemeldet.
Hier ist der Befehl:
$ virtualenv -p /usr/bin/python3.4 python34virtEnv

Sollte durch https://bitbucket.org/pypa/distlib/commits/a258e3bdd6f8205f3815e173a55ffe857e743995 behoben werden

UPDATE 20.01.2018: behoben in distlib 0.2.4, pip 9.0.0 (https://github.com/pypa/pip/commit/c8e8a99b7a6f9404536bc9d895a1a42a060f7f91) und landete in virtualenv 15.1.0 (https://github. com/pypa/virtualenv/pull/972/commits/e944bdc384759c27662b8ffd9264367d569376ee)

Dieses alte Problem kann jetzt geschlossen werden, da EOL Python 3.3 unter https://github.com/pypa/virtualenv/pull/1089 gelöscht wurde

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen