Skip to content

Installing six<1.10 breaks fresh virtualenv #1009

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

Closed
asottile opened this issue Jan 26, 2017 · 3 comments
Closed

Installing six<1.10 breaks fresh virtualenv #1009

asottile opened this issue Jan 26, 2017 · 3 comments

Comments

@asottile
Copy link
Contributor

I wasn't sure which project to make this ticket on since it involves a combination of pip / setuptools / virtualenv to reproduce.

A downgrading of six in a fresh virtualenv makes it impossible to install packages from source.

First create a fresh virtualenv (I'm using 15.0.1):

virtualenv venv

This goes out to pypi and downloads the latest versions of pip / setuptools / wheel / etc. In this case bringing in the new setuptools==34.x

$ pip freeze --all
appdirs==1.4.0
packaging==16.8
pip==9.0.1
pkg-resources==0.0.0
pyparsing==2.1.10
setuptools==34.0.2
six==1.10.0
wheel==0.30.0a0

Next, downgrade six in this virtualenv

$ pip install six==1.9
Collecting six==1.9
  Using cached six-1.9.0-py2.py3-none-any.whl
Installing collected packages: six
  Found existing installation: six 1.10.0
    Uninstalling six-1.10.0:
      Successfully uninstalled six-1.10.0
Successfully installed six-1.9.0

Now pip cannot install from source distributions:

$ pip install simplejson
Collecting simplejson
  Using cached simplejson-3.10.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/nail/tmp/pip-build-vtpFz7/simplejson/setup.py", line 111, in <module>
        run_setup(not IS_PYPY)
      File "/nail/tmp/pip-build-vtpFz7/simplejson/setup.py", line 108, in run_setup
        **kw)
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/tmp/venv/local/lib/python2.7/site-packages/setuptools/dist.py", line 320, in __init__
        _Distribution.__init__(self, attrs)
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/tmp/venv/local/lib/python2.7/site-packages/setuptools/dist.py", line 386, in finalize_options
        ep.require(installer=self.fetch_build_egg)
      File "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2245, in require
        items = working_set.resolve(reqs, env, installer)
      File "/tmp/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 834, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.VersionConflict: (six 1.9.0 (/tmp/venv/lib/python2.7/site-packages), Requirement.parse('six>=1.10.0'))
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /nail/tmp/pip-build-vtpFz7/simplejson/

Although this bug report seems a little contrived, it's the simplest case. This is breaking actual builds with much more complicated setups.

A "fix" to escape the breaking is to either downgrade setuptools or restore the version of six again (luckily six provides a wheel!).

@truthdoug
Copy link

There was a recent commit to setuptools which requires >=1.10.0 (line 167). This was part of the 34.0.2 release which came out just two days ago.

@truthdoug
Copy link

(minor correction: the first release with this change was 34.0.0 (released on Jan 23))

@asottile
Copy link
Contributor Author

This is no longer an issue after setuptools re-vendored dependencies -- closing.

cathay4t added a commit to cathay4t/nmstate that referenced this issue Feb 11, 2020
The CentOS 8 tox is using latest virtualenv which is not compatible
with pip installed python3-six(when intalling pytest) due to
pypa/virtualenv#1009 issue.

The `VIRTUALENV_NO_DOWNLOAD=1` environment variable will stop virtualenv
doing so.

Use dnf to install pytest from AppStream and pytest-cov from EPEL8 and
fixed the tox version to 3.5.3 using pip3.

Since we are using site packages in tox unit test, there is no need
for rpms from "Development Tools" group.

Signed-off-by: Gris Ge <[email protected]>
cathay4t added a commit to cathay4t/nmstate that referenced this issue Feb 11, 2020
The CentOS 8 tox is using latest virtualenv which is not compatible
with pip installed python3-six(when intalling pytest) due to
pypa/virtualenv#1009 issue.

The `VIRTUALENV_NO_DOWNLOAD=1` environment variable will stop virtualenv
doing so.

Use dnf to install pytest from AppStream and pytest-cov from EPEL8 and
fixed the tox version to 3.5.3 using pip3.

Since we are using site packages in tox unit test, there is no need
for rpms from "Development Tools" group.

Signed-off-by: Gris Ge <[email protected]>
cathay4t added a commit to cathay4t/nmstate that referenced this issue Feb 11, 2020
The CentOS 8 tox is using latest virtualenv which is not compatible
with pip installed python3-six(when intalling pytest) due to
pypa/virtualenv#1009 issue.

The `VIRTUALENV_NO_DOWNLOAD=1` environment variable will stop virtualenv
doing so.

Use dnf to install pytest from AppStream and pytest-cov from EPEL8 and
fixed the tox version to 3.5.3 using pip3.

Since we are using site packages in tox unit test, there is no need
for rpms from "Development Tools" group.

Signed-off-by: Gris Ge <[email protected]>
cathay4t added a commit to cathay4t/nmstate that referenced this issue Feb 11, 2020
The CentOS 8 tox is using latest virtualenv which is not compatible
with pip installed python3-six(when intalling pytest) due to
pypa/virtualenv#1009 issue.

The `VIRTUALENV_NO_DOWNLOAD=1` environment variable will stop virtualenv
doing so.

Use dnf to install pytest from AppStream and pytest-cov from EPEL8 and
fixed the tox version to 3.5.3 using pip3.

Since we are using site packages in tox unit test, there is no need
for rpms from "Development Tools" group.

Signed-off-by: Gris Ge <[email protected]>
EdDev pushed a commit to cathay4t/nmstate that referenced this issue Feb 11, 2020
The CentOS 8 tox is using latest virtualenv which is not compatible
with pip installed python3-six(when intalling pytest) due to
pypa/virtualenv#1009 issue.

The `VIRTUALENV_NO_DOWNLOAD=1` environment variable will stop virtualenv
doing so.

Use dnf to install pytest from AppStream and pytest-cov from EPEL8 and
fixed the tox version to 3.5.3 using pip3.

Since we are using site packages in tox unit test, there is no need
for rpms from "Development Tools" group.

Signed-off-by: Gris Ge <[email protected]>
EdDev pushed a commit to nmstate/nmstate that referenced this issue Feb 11, 2020
The CentOS 8 tox is using latest virtualenv which is not compatible
with pip installed python3-six(when intalling pytest) due to
pypa/virtualenv#1009 issue.

The `VIRTUALENV_NO_DOWNLOAD=1` environment variable will stop virtualenv
doing so.

Use dnf to install pytest from AppStream and pytest-cov from EPEL8 and
fixed the tox version to 3.5.3 using pip3.

Since we are using site packages in tox unit test, there is no need
for rpms from "Development Tools" group.

Signed-off-by: Gris Ge <[email protected]>
@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

2 participants