Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using virtualenv from a virtualenv doesn't work anymore #540

Closed
altaurog opened this issue Jan 13, 2014 · 2 comments
Closed

Using virtualenv from a virtualenv doesn't work anymore #540

altaurog opened this issue Jan 13, 2014 · 2 comments

Comments

@altaurog
Copy link

I've been using virtualenv as described here to bootstrap an initial virtualenv, install virtualenv into it, and use that to create additional virtualenvs. I've done this with no problems for quite a while, but it broke in v1.11.

The sequence is as follows:

$ wget -q https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.tar.gz
$ tar xf virtualenv-1.10.tar.gz
$ python virtualenv-1.10/virtualenv.py -q venv/default
$ . venv/default/bin/activate
(default) $ cd virtualenv-1.10
(default) $ python setup.py -q install
(default) $ cd
(default) $ virtualenv venv/new

That worked fine with v1.10, and it's really a fantastic way to go about it. Until now. With v1.11 the last command fails. Here's the traceback:

$ virtualenv venv/test
Using real prefix '/usr'
New python executable in venv/test/bin/python
Installing setuptools, pip...
  Complete output from command /home/ubuntu/venv/test/bin/python -c "import sys, pip; pip...ll\"] + sys.argv[1:])" setuptools pip:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/__init__.py", line 9, in <module>
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/pip-1.5-py2.py3-none-any.whl/pip/log.py", line 8, in <module>
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 2696, in <module>
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 429, in __init__
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 443, in add_entry
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1722, in find_in_zip
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1298, in has_metadata
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1614, in _has
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/pkg_resources.py", line 1488, in _zipinfo_name
AssertionError: /home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/EGG-INFO/PKG-INFO is not a subpath of /home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv_support/setuptools-2.0.2-py2.py3-none-any.whl/
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "/home/ubuntu/venv/default/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==1.11', 'console_scripts', 'virtualenv')()
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv.py", line 820, in main
    symlink=options.symlink)
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv.py", line 988, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv.py", line 956, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/home/ubuntu/venv/default/lib/python2.6/site-packages/virtualenv-1.11-py2.6.egg/virtualenv.py", line 898, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/ubuntu/venv/test/bin/python -c "import sys, pip; pip...ll\"] + sys.argv[1:])" setuptools pip failed with error code 1
@qwcode
Copy link

qwcode commented Jan 13, 2014

the error you're getting is due to #524, which has a fix in v1.11.1, which is soon to be released.

@qwcode qwcode closed this as completed Jan 13, 2014
@ionelmc
Copy link

ionelmc commented Jan 21, 2014

This still happens on 1.11.1 - I'm opening a different issue for this: #552

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants