LINUX.ORG.RU

Не работает virtualenv

 


0

1
$ virtualenv bar
Running virtualenv with interpreter /usr/bin/python2
New python executable in bar/bin/python2
Also creating executable in bar/bin/python
Installing setuptools, pip...
  Complete output from command /home/user/foo/bar/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking setuptools
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/req.py", line 1178, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/index.py", line 292, in find_requirement
    elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/util.py", line 739, in is_prerelease
    return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable

Storing debug log for failure in /home/user/.pip/pip.log
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 2378, in <module>
    main()
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 830, in main
    symlink=options.symlink)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 1032, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 975, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 917, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/user/foo/bar/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 2
$ cat ~/.pip/pip.log 
------------------------------------------------------------
-c run on Thu May 21 11:21:45 2015
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking setuptools
  URLs to search for versions for setuptools:
  Skipping link . (from -f); not a file
  Skipping link /usr/lib/python3/dist-packages (from -f); not a file
  Skipping link /usr/share/python-wheels/ (from -f); not a file
  Skipping link file:///home/user/foo/bar; not a file
  Skipping link file:///usr/lib/python3/dist-packages/virtualenv-1.11.6.egg-info; unknown archive format: .egg-info
  Skipping link file:///usr/lib/python3/dist-packages/virtualenv.py; unknown archive format: .py
  Skipping link file:///usr/lib/python3/dist-packages/pkg_resources.py; unknown archive format: .py
  Skipping link file:///usr/lib/python3/dist-packages/__pycache__; not a file
  Skipping link file:///usr/lib/python3/dist-packages/debconf.py; unknown archive format: .py
  Skipping link file:///usr/share/python-wheels/chardet-2.3.0-py2.py3-none-any.whl; wrong project name (not setuptools)
  Skipping link file:///usr/share/python-wheels/urllib3-1.10.4-py2.py3-none-any.whl; wrong project name (not setuptools)
  Skipping link file:///usr/share/python-wheels/pip.dependencies; unknown archive format: .dependencies
  Skipping link file:///usr/share/python-wheels/six-1.9.0-py2.py3-none-any.whl; wrong project name (not setuptools)
  Skipping link file:///usr/share/python-wheels/distlib-0.2.0-py2.py3-none-any.whl; wrong project name (not setuptools)
  Skipping link file:///usr/share/python-wheels/requests-2.4.3-py2.py3-none-any.whl; wrong project name (not setuptools)
  Skipping link file:///usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl; wrong project name (not setuptools)
  Found link file:///usr/share/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl, version: 5.5.1
  Skipping link file:///usr/share/python-wheels/colorama-0.3.3-py2.py3-none-any.whl; wrong project name (not setuptools)
  Skipping link file:///usr/share/python-wheels/html5lib-0.999-py2.py3-none-any.whl; wrong project name (not setuptools)
  Local files found: /usr/share/python-wheels/setuptools-5.5.1-py2.py3-none-any.whl
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/req.py", line 1178, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/index.py", line 292, in find_requirement
    elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/util.py", line 739, in is_prerelease
    return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable
$ aptitude show virtualenv | grep Version
Version: 1.11.6+ds-1
$ aptitude show python-pip | grep Version
Version: 1.5.6-5
$ aptitude show python-setuptools | grep Version
Version: 5.5.1-1

setuptools-5.5.1
pip-1.5.6

Ты где это говно мамонта откопал? У setuptools последняя версия где-то около 15-й уже. 15.1 что-ли, не помню. У pip — шестая.

Для начала советую попробовать обновить их. Ну а там посмотрим.

Kilte ★★★★★ ()
Ответ на: комментарий от suuaq

Удали этот глюкодром и поставь нормальный дистр. Проблемы будут решены.

З.ы. либо собирай-конпиляй все необходимое из исходников

Siado ★★★★★ ()
Ответ на: комментарий от Jills

Я считаю, что древность определяется не тем, когда именно был релиз, а сколько мажорных версий вышло после. Как правило один мажорный релиз содержит достаточно много изменений, в том числе и серьёзных с потерей совместимости. А если таких релизов не один а десять (с момента выхода используемой версии), то с уверенностью можно сказать, что используемая версия — говно мамонта, которое нужно как можно скорее закопать (если есть возможность конечно же).

Правда в случае с setuptools не всё так однозначно. Они там что-то намудрили и релизы выпускаются очень часто. (Кстати недавно оказывается уже 16-я версия вышла, готов поспорить, что к концу года они доберутся если не до 40-й, то до 30-й точно). Но всё равно, как я уже сказал, 5-я версия достаточно древняя.

Kilte ★★★★★ ()
Ответ на: комментарий от Jills
$ aptitude show python-pip
Package: python-pip                      
State: installed
Automatically installed: no
Version: 1.5.6-5
$ which pip
/usr/bin/pip
$ pip install --upgrade pip
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1097, in prepare_files
    req_to_install, self.upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
    elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
    return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable

Storing debug log for failure in /home/caryoscelus/.pip/pip.log
anonymous ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.