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

Broken package: setuptools #74

Closed
jvonau opened this issue Jan 13, 2020 · 9 comments
Closed

Broken package: setuptools #74

jvonau opened this issue Jan 13, 2020 · 9 comments

Comments

@jvonau
Copy link

jvonau commented Jan 13, 2020

Package name: setuptools
Issue type: Broken package
Link to PyPI page: https://pypi.org/project/setuptools
Link to piwheels page: https://www.piwheels.hostedpi.com/project/setuptools/
Version: 45.0.0
Python version: python3.7 installing a python2.7 virtual environment
I am the maintainer: No
More information:

Hidden behind ansible

/usr/bin/virtualenv --no-site-packages -ppython2.7 /usr/local/kalite/venv  
New python executable in /usr/local/kalite/venv/bin/python2.7
Also creating executable in /usr/local/kalite/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...
Complete output from command /usr/local/kalite/venv/bin/python2.7 - setuptools pkg_resources pip wheel:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Looking in links: /usr/lib/python3/dist-packages, /usr/share/python-wheels
Collecting setuptools 
Downloading https://www.piwheels.org/simple/setuptools/setuptools-45.0.0-py2.py3-none-any.whl (583kB)
setuptools requires Python '>=3.5' but the running Python is 2.7.16
...Installing setuptools, pkg_resources, pip, wheel...done.
Running virtualenv with interpreter /usr/bin/python2.7
stderr: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2379, in main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 996, in create_environment
download=download
File "/usr/lib/python3/dist-packages/virtualenv.py", line 926, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 817, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /usr/local/kalite/venv/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 1

Commenting out the piwheels lines in /etc/pip.conf results in no traceback.

@acinonyx
Copy link

Bump.

This is an issue that affects many projects since it renders virtualenv unusable in Python 2.

@holta
Copy link

holta commented Jan 17, 2020

@bennuttall @benjaoming

Internet-in-a-Box will implement an ugly workaround (deleting /etc/pip.conf) if you don't have any better ideas here?

Specifically: iiab/iiab#2160

@benjaoming
Copy link

@holta interesting! I am investigating here, because I noticed today that KA Lite's build pipeline was broken. I guess there's more to it, namely the runtime requirements, too?

learningequality/ka-lite#5626

@benjaoming
Copy link

Btw. I'm getting the same issues on our Build system with Python 3.4. I don't know why setuptools 45.0 is downloaded by pip in the first place, since PyPi and pip shouldn't be downloading it -- its metadata should prohibit it:

Programming Language
    Python :: 3
    Python :: 3.5
    Python :: 3.6
    Python :: 3.7
    Python :: 3.8

https://pypi.org/project/setuptools/

@bennuttall
Copy link
Member

Ok, I see the problem. You can't even create a Python 2 virtualenv because it requires setuptools, and the setuptools provided by piwheels doesn't work on Python 2, despite being tagged py2.py3.

It's possibly something that can be fixed upstream (the incorrect tagging). But for now I think deleting the wheel from piwheels is the best course of action.

Reminder: Python 2 is EOL.

@acinonyx
Copy link

Ok, I see the problem. You can't even create a Python 2 virtualenv because it requires setuptools, and the setuptools provided by piwheels doesn't work on Python 2, despite being tagged py2.py3.

It's possibly something that can be fixed upstream (the incorrect tagging). But for now I think deleting the wheel from piwheels is the best course of action.

I am pretty sure that this issue is related to piwheels mirror:

  • pythonhosted returns the correct version of setuptools:
Installing setuptools, pkg_resources, pip, wheel...
  Looking in links: /usr/lib/python3/dist-packages, /usr/share/python-wheels/
  Collecting setuptools
    Using cached https://files.pythonhosted.org/packages/f9/d3/955738b20d3832dfa3cd3d9b07e29a8162edb480bf988332f5e6e48ca444/setuptools-44.0.0-py2.py3-none-any.whl
  Collecting pkg_resources
  Collecting pip
    Using cached https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl
  Collecting wheel
    Cache entry deserialization failed, entry ignored
    Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
  Installing collected packages: setuptools, pkg-resources, pip, wheel
  Successfully installed pip-19.3.1 pkg-resources-0.0.0 setuptools-44.0.0 wheel-0.33.6
...Installing setuptools, pkg_resources, pip, wheel...done.

Since the issue also affects Python 3.4 users, I assume that piwheels does not respect the classifiers for some reason.

@benjaoming
Copy link

Since the issue also affects Python 3.4 users, I assume that piwheels does not respect the classifiers for some reason.

I am still investigating this, I can't say for sure how I ended up with setuptools 45 on a Python 3.4 system.

But the universal classifier fixed by @bennuttall would certainly seem important!

@bennuttall
Copy link
Member

I have now removed setuptools 45.0.0 from piwheels, and reported the issue to setuptools. I've also opened a PR to fix the issue.

@holta
Copy link

holta commented Jan 19, 2020

Thanks @bennuttall!

pypa/setuptools#1976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants