LINUX.ORG.RU

Не создается виртуальное окружение!

 , ,


0

1

Всем доброго времени суток!

После dist-upgrade не могу создать виртуальное окружение python (v2.7.x).

$ virtualenv test                                                                                            1 ↵
Running virtualenv with interpreter /usr/local/bin/python2
New python executable in test/bin/python2
Not overwriting existing python script test/bin/python (you must use test/bin/python2)
Installing setuptools, pip...
  Complete output from command /home/djnoob/test/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/__init__.py", line 60, in <module>
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/util.py", line 18, in <module>
  File "/home/djnoob/test/lib/python-wheels/distlib-0.1.9-py2.py3-none-any.whl/distlib/version.py", line 14, in <module>
  File "/home/djnoob/test/lib/python-wheels/distlib-0.1.9-py2.py3-none-any.whl/distlib/compat.py", line 31, in <module>
ImportError: cannot import name HTTPSHandler
----------------------------------------
...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/djnoob/test/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1

Пробовал гуглить - ничего адекватного. Система debian sid, пакеты python-virtualenv и python-pip стоят.

WTF?


Оставил только python2. Теперь при попытке создания виртуального окружения пишет:

$ virtualenv test/
New python executable in test/bin/python
Installing setuptools, pip...
Complete output from command /home/djnoob/test/bin/python -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/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/basecommand.py», line 122, in main
status = self.run(options, args)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/commands/install.py», line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/req.py», line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/index.py», line 252, in find_requirement
for page in self._get_pages(locations, req):
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/index.py», line 387, in _get_pages
page = self._get_page(location, req)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/index.py», line 568, in _get_page
session=self.session,
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/index.py», line 670, in get_page
resp = session.get(url, headers={«Accept»: «text/html»})
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py», line 468, in get
return self.request('GET', url, **kwargs)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/download.py», line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py», line 456, in request
resp = self.send(prep, **send_kwargs)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py», line 559, in send
r = adapter.send(request, **kwargs)
File «/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/download.py», line 194, in send
stats = os.stat(pathname)
OSError: [Errno 36] File name too long: '/home/peter/\xc3\x90\xc2\xa0\xc3\x90\xc2\xb0\xc3\x91\xc2\x81\xc3\x90\xc2\xbf\xc3\x90\xc2\xb8\xc3\x91\xc2\x81\xc3\x90\xc2\xb0\xc3\x90\xc2\xbd\xc3\x90\xc2\xb8\xc3\x90\xc2\xb5 \xc3\x91\xc2\x8d\xc3\x90\xc2\xbb\xc3\x90\xc2\xb5\xc3\x90\xc2\xba\xc3\x91\xc2\x82\xc3\x91\xc2\x80\xc3\x90\xc2\xb8\xc3\x91\xc2\x87\xc3\x90\xc2\xb5\xc3\x90\xc2\xba \xc3\x90\xc2\xb8\xc3\x90\xc2\xb7\xc3\x82\xc2\xa0\xc3\x90\xc2\xa2\xc3\x90\xc2\xb8\xc3\x91\xc2\x85\xc3\x90\xc2\xbe\xc3\x91\xc2\x80\xc3\x90\xc2\xb5\xc3\x91\xc2\x86\xc3\x90\xc2\xba\xc3\x90\xc2\xbe\xc3\x90\xc2\xb9 \xc3\x90\xc2\xb2\xc3\x82\xc2\xa0\xc3\x90\xc2\xa0\xc3\x90\xc2\xbe\xc3\x91\xc2\x81\xc3\x91\xc2\x82\xc3\x90\xc2\xbe\xc3\x90\xc2\xb2-\xc3\x90\xc2\xb3\xc3\x90\xc2\xbb\xc3\x90\xc2\xb0\xc3\x90\xc2\xb2\xc3\x90\xc2\xbd\xc3\x91\xc2\x8b\xc3\x90\xc2\xb9, 14\xc3\x82\xc2\xa0\xc3\x90\xc2\xb8\xc3\x91\xc2\x8e\xc3\x90\xc2\xbd\xc3\x91\xc2\x8f, \xc3\x90\xc2\xb2 \xc3\x91\xc2\x81\xc3\x91\xc2\x83\xc3\x90\xc2\xb1\xc3\x90\xc2\xb1\xc3\x90\xc2\xbe\xc3\x91\xc2\x82\xc3\x91\xc2\x83.html'

Storing debug log for failure in /home/peter/.pip/pip.log
----------------------------------------
...Installing setuptools, pip...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 824, in main
symlink=options.symlink)
File «/usr/local/lib/python2.7/dist-packages/virtualenv.py», line 992, in create_environment
install_wheel(to_install, py_executable, search_dirs)
File «/usr/local/lib/python2.7/dist-packages/virtualenv.py», line 960, in install_wheel
'PIP_NO_INDEX': '1'
File «/usr/local/lib/python2.7/dist-packages/virtualenv.py», line 902, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/djnoob/test/bin/python -c «import sys, pip; sys...d\»] + sys.argv[1:]))" setuptools pip failed with error code 2

djnoob
() автор топика
Ответ на: комментарий от djnoob

Победил! После некоторых шаманств заработало).

djnoob
() автор топика
Ответ на: комментарий от anonymous

Не русский что ли, сука?

Вот уж не знал что суки только русскими бывают. Буду знать.

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.