question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setuptools 45.0.0 gets installed on a python 2.7 virtualenv

See original GitHub issue

Hello,

I have a CI job that creates a virtualenv from an old version (relying on pip==8.1.2) with python 2.7.

I then ask pip to update setuptools wheel pip. In the process it installs setuptools==45.0.0 and updates pip==19.3.1.

The rest of the CI fails because pip refuses to install the other dependencies due to setuptools incompatibility with python 2.7.

I believe that this could be avoided by removing:

[bdist_wheel]
universal = 1

from setup.cfg.

What is the reason for keeping this option in the cfg?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
fungicommented, Jan 13, 2020

bdist_wheel.universal=1 is still a problem though, because it results in a py2.py3 wheel, which inherently means the file is expected to work with at least some Python 2 interpreter. If this file winds up in a local wheelhouse or a remote one served with an unintelligent index rather than PyPI itself (e.g., Apache mod_autoindex) then pip on Python 2.7 will attempt to install it anyway rather than selecting an older version.

5reactions
exarkuncommented, Jan 13, 2020

@hugovk This didn’t seem to work for us. Our current workaround is to run

pip install -U pip
pip install setuptools==44.0.0

before installing the rest of our dependencies.

I also had to ask for setuptools==44.0.0 explicitly. There is already a setuptools installed in the virtualenv, by the older version of pip, and I guess pip won’t downgrade to a working version if you only do pip install -U setuptools.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python virtualenv setuptools package issue - Stack Overflow
If I understood correctly it should not be necessary if the distributions are downloaded directly from PyPI or any other fully compatible index....
Read more >
virtualenv 13.0.3 - PyPI
Virtual Python Environment builder.
Read more >
Project Summaries - Python Packaging User Guide
Project Summaries¶. Summaries and links for the most relevant projects in the space of Python installation and packaging.
Read more >
Installation - Streamlink 5.1.2 documentation
Another method of installing Streamlink in a non-system-wide way is using virtualenv, which creates a user owned Python environment instead. Install with ...
Read more >
Change log : python-pip package : Ubuntu - Launchpad
Drop Python 2 wheels, these may be provided by a separate source package. ... 9.0.0. virtualenv is installing setuptools 45.0.0 into Python 2.7...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found