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.

Incompatible install in Python3 (Setuptools warns about Python 2 incompatibility)

See original GitHub issue

Other notes

The reason to submit this is because this warning came up when building a package for a program (HTSeq: https://github.com/htseq/htseq ) via python3 setup.py install: The program compiled fine, but -as said- I get this in the output:

… htseq-release_0.11.4/todo.txt symlinking folders for python3 running install running build running build_py running preprocess cythonizing /usr/lib64/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2 ************************************************************ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< in a subsequent release (no sooner than 2020-04-20). .. .. SWIGging correcting SWIG for python3

I do not understand why this popped up, not calling python at all, nor using pip or pip3 for creating the HTSeq package.

Environment Details

  • Operating System and version: Slackware64-current
  • Python versions on the system: 2.7.17 and 3.8.2
  • Python installed how: via packages build by ‘setup.py install’ route https://packages.slackware.com/?r=slackware64-current&p=python-2.7.17-x86_64-2.txz https://packages.slackware.com/?r=slackware64-current&p=python3-3.8.2-x86_64-1.txz https://packages.slackware.com/?r=slackware64-current&p=python-pip-20.0.2-x86_64-1.txz https://packages.slackware.com/?r=slackware64-current&p=python-setuptools-45.3.0-x86_64-1.txz

Output of pip --version from commandline: bash-5.0$ pip --version /usr/lib64/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2 ************************************************************ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< in a subsequent release (no sooner than 2020-04-20). Please ensure you are installing Setuptools using pip 9.x or later or pin to setuptools<45 in your environment. If you have done those things and are still encountering this message, please comment in https://github.com/pypa/setuptools/issues/1458 about the steps that led to this unsupported combination. ************************************************************ sys.version_info < (3,) and warnings.warn(pre + “" * 60 + msg + "” * 60) pip 20.0.2 from /usr/lib64/python2.7/site-packages/pip (python 2.7) bash-5.0$ pip3 --version pip 20.0.2 from /usr/lib64/python3.8/site-packages/pip (python 3.8) bash-5.0$

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brobrcommented, May 3, 2020

Thanks, I’ve pointed the developers of HTSeq to this post again; maybe they can take this on board.

0reactions
McSinyxcommented, May 3, 2020

So, isn’t it a python bug due to the mixed usage of p/cython vs p/cython3 etc.?

AFAIK the more canonical way to do it is to call Cython with sys.executable (that’s how Cython performs functional tests), however I think it might be a better idea to avoid calling the shell command and use the Python function cythonize.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip install fails because of a build dependency Python 2.7 ...
Problem arises when one of my dependencies needs setuptools to build itself, their specified version in the pyproject.toml or setup.py is ...
Read more >
Porting Python 2 Code to Python 3 — Python 3.11.1 ...
In your setup.py file you should have the proper trove classifier specifying what versions of Python you support. As your project does not...
Read more >
Cheat Sheet: Writing Python 2-3 compatible code
urllib is the hardest module to use from Python 2/3 compatible code. You might want to switch to Requests (http://python-requests.org) instead.
Read more >
setuptools 2.0 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages. ... 1.1.2. 1.1.1. 1.1. 1.0. Backward-Incompatible Changes. 0.9.8. 0.9.7.
Read more >
How to Update Python 2 to Python 3 - The Couchbase Blog
A future version of pip will drop support for Python 2.7.” ... for example) to install packages based on the installed Python 3...
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