Ich verwende Ubuntu-12.04:
pip --Version
pip 8.0.2 von /usr/local/lib/python2.7/dist-packages (python 2.7)virtualenv --version
14.0.6
virtualenv kann die Umgebung nicht erstellen. Ich weiß nicht, warum es denkt, dass es Pip 7.0.1 verwenden soll, wenn Pip 8.0.2 installiert ist.
Ich habe versucht, pip neu zu installieren (dh das apt-Paket zu entfernen, über ez_setup zu installieren), virtualenv - nichts hat funktioniert.
Auf anderen Rechnern hat 14.0.6 gut funktioniert, nur dieser bereitet mir Schwierigkeiten.
Jede Hilfe wäre willkommen!
Ich füge das Protokoll und im Folgenden die Pip-Umgebung bei:
Protokoll
virtualenv --system-site-packages /tmp/venv
New python executable in /tmp/venv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /tmp/venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel:
You are using pip version 7.0.1, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting setuptools
/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 291, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/wheel.py", line 704, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 317, in prepare_files
functools.partial(self._prepare_file, finder))
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 304, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 439, in _prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/req/req_install.py", line 244, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/index.py", line 486, in find_requirement
all_versions = self._find_all_versions(req.name)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/index.py", line 435, in _find_all_versions
formats = fmt_ctl_formats(self.format_control, canonical_name)
File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/index.py", line 1260, in fmt_ctl_formats
if canonical_name in fmt_ctl.only_binary:
AttributeError: 'str' object has no attribute 'only_binary'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 705, in main
symlink=options.symlink)
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 924, in create_environment
download=download,
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 877, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env)
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 783, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /tmp/venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code 2
Pip-Liste
APScheduler (2.1.2)
apt-xapian-index (0.44)
boto (2.2.2)
chardet (2.0.1)
Cheetah (2.4.4)
cloud-init (0.6.3)
command-not-found (0.2.44)
configobj (4.7.2)
demjson (1.6)
distribute (0.6.24dev-r0)
euca2ools (2.0.0)
futures (2.2.0)
GnuPGInterface (0.3.2)
google-api-python-client (1.3.1)
httplib2 (0.9)
iotop (0.4.4)
keyring (0.9.2)
Landscape-Client (14.12)
language-selector (0.1)
launchpadlib (1.9.12)
lazr.restfulclient (0.12.0)
lazr.uri (1.0.3)
lxml (3.2.3)
M2Crypto (0.21.1)
Markdown (2.6.5)
oauth (1.0.1)
oauth2client (1.4.6)
PAM (0.4.2)
paramiko (1.7.7.1)
pika (0.9.14)
pip (8.0.2)
pyasn1 (0.1.7)
pyasn1-modules (0.0.5)
pycrypto (2.6.1)
pycurl (7.19.5)
pyes (0.99.6)
pymongo (2.8)
pyOpenSSL (0.12)
pyserial (2.5)
python-apt (0.8.3ubuntu7.3)
python-debian (0.1.21ubuntu1)
PyYAML (3.10)
pyzabbix (0.7.2)
requests (2.5.1)
rsa (3.1.4)
setuptools (18.7)
simplejson (3.6.5)
six (1.9.0)
tabulate (0.7.5)
thrift (0.9.0)
tinys3 (0.1.11)
tldextract (1.2.2)
Twisted-Core (11.1.0)
Twisted-Web (11.1.0)
ufw (0.31.1.post1)
unattended-upgrades (0.1)
unicodecsv (0.9.4)
uritemplate (0.6)
urllib3 (1.10)
virtualenv (13.1.0)
wadllib (1.3.0)
wheel (0.29.0)
XlsxWriter (0.7.2)
zbxsend (0.1.6)
zope.interface (3.6.1)
Ich bin mir nicht sicher, wie Sie möglicherweise einen virtualenv
haben können, der 14.0.6.
für seine Version ausgibt, aber schlechte alte Räder in dist-packages/virtualenv_support
hat. Ich würde vorschlagen, alle virtualenv*
-Dinge in /usr/local/lib/python2.7/dist-packages/
zu entfernen und neu zu installieren.
Danke @Ivoz , das hat funktioniert.
Ich habe keine Ahnung, wie es dazu kam - wir verwenden chef, und das Kochbuch hält die Versionen ziemlich aktuell.
Ich habe das gleiche Problem, als ich finde, dass all dies wegen der Setuptools und Räder passiert als:
1. Ich habe Setuptools und Räder von Pip deinstalliert
virutalenv-15.1.0 von https://pypi.python.org/pypi/virtualenv
1) Versuchen Sie, Pysocks zu installieren - sudo pip install pysocks
2) Verwenden Sie - unset all_proxy
3) Wiederholen
Das löst...
export all_proxy= https://proxy_here :port_here/
@skylather das hat mein Problem gelöst ... danke
@skylather +1 das hat auch bei mir funktioniert, danke!!!!
danke @Ivoz , deine Idee hat mein Problem gelöst.
danke @Ivoz Hat super geklappt!
@selectee4all Ihre Lösung funktioniert für mich. "setenv all_proxy https://proxy_here :port_here/"
löst das Proxy-Problem nicht nur für dieses Setup, sondern für alle Installationen. Vielen Dank.
Ich bin mir nicht sicher, wie Sie möglicherweise einen
virtualenv
haben können, der14.0.6.
für seine Version ausgibt, aber schlechte alte Räder indist-packages/virtualenv_support
hat. Ich würde vorschlagen, allevirtualenv*
-Dinge in/usr/local/lib/python2.7/dist-packages/
zu entfernen und neu zu installieren.
Ich danke dir sehr. Das hat mir geholfen!
Hilfreichster Kommentar
1) Versuchen Sie, Pysocks zu installieren -
sudo pip install pysocks
2) Verwenden Sie -
unset all_proxy
3) Wiederholen