pyrsistent: ERROR: Package 'pyrsistent' requires a different Python: 2.7.8 not in '>=3.5'

Hello,

The latest version of the pyrsistent dropped Python 2 support after one of the contributors added python_requires='>=3.5' in setup.py.

pip install pyrsistent Collecting pyrsistent Downloading https://files.pythonhosted.org/packages/83/14/6d02fad9caeb3903f06f9442e57789ca2fbb3cf7daf66d4de3aa4dc867dc/pyrsistent-0.17.1.tar.gz (106kB) 100% |████████████████████████████████| 112kB 604kB/s pyrsistent requires Python '>=3.5' but the running Python is 2.7.17

The fix added to declare Python 2 support drop seems to be ok but I think there is a problem with the sdist. I mean, what version of setuptools did you used to create the sdist? Because supporting python_requires requires setuptools>=24.2.0 and pip>=9.0.0 to benefit from it

https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 7
  • Comments: 24 (5 by maintainers)

Commits related to this issue

Most upvoted comments

I managed to manually install 0.16.1 to get by the issue on buster 10.6, that has pip version 18.1-5. After manually installing 0.16.1, my transitive dependency error when installing pyjson was resolved.

sudo pip install pyrsistent==0.16.1

If you look here you see that the package does not include the metadata. Compare it with e.g. this one where it says “Requires: Python >=3.7” on the side. This is the same metadata that is also used during installs.

Try pip install -U pip setuptools twine to make sure all those things are recent enough.

OK, 0.17.X is now yanked until this has been sorted.

not the author, but nuking packages is generally not a good idea (even though it’s very unlikely that someone started depending on .1 and .2 which were only out for a very short time). I’d say whoever is using proxies should use this opportunity to ask the developers (or vendors, since I think some of them are commercial) to fix this!

Even though pypi says it’s yanked, pip is still trying to install 0.17.2. Even with --no-cache-dir.

@Lothiraldan I don’t think that’s required…

Just FYI if anyone has an issue with pip installing wrong pyrsistent version (0.17.2) for python2: Take a note that pip respects yanked packages from version 19.2. If you use earlier pip version, it will install wrong package.

Probably because it’s not broken: Requires: Python >=3.5

@tobgu thank you for your fixes. Would it be possible to completely remove 0.17.0, 0.17.1 and 0.17.2 versions from PyPi? Not all PyPI proxies are propagating “yanked” attribute, so not working versions still may be offered to some users.