pip: Unable to install python library tables on newly created python 2.7.18 in Anaconda 3
Description
Command pip install tables failed on environment python 2.7.18 created with Anaconda 3
ERROR: Could not find a version that satisfies the requirement oldest-supported-numpy (from versions: none) ERROR: No matching distribution found for oldest-supported-numpy
Expected behavior
No response
pip version
20.3.4
Python version
2.7.18
OS
W10
How to Reproduce
Install py2.7 on Anaconda 3: conda create -n py27 python=2.7
Install tables pip install tables
Output
Full traceback:
pip install tables
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tables
Using cached https://files.pythonhosted.org/packages/84/86/34604cfd8e79d23ffef7f1c0ab134ddb98da572d0fcb9cb4631d5b47f549/tables-3.5.2-cp27-cp27m-win_amd64.whl
Requirement already satisfied: numpy>=1.9.3 in c:\users*\appdata\local\anaconda3\envs\py27\lib\site-packages (from tables) (1.16.6)
Requirement already satisfied: six>=1.9.0 in c:\users*\appdata\roaming\python\python27\site-packages (from tables) (1.16.0)
Collecting numexpr>=2.6.2
Using cached https://files.pythonhosted.org/packages/76/b3/935d7a16f696ecfa8e06ce1153b1f54925a42904c245cebb15077762b965/numexpr-2.8.1.tar.gz
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users*\AppData\Local\anaconda3\envs\py27\python.exe' 'C:\Users*\AppData\Local\anaconda3\envs\py27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users***\appdata\local\temp\pip-build-env-wacl5j\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel oldest-supported-numpy
cwd: None
Complete output (7 lines):
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement oldest-supported-numpy (from versions: none)
ERROR: No matching distribution found for oldest-supported-numpy
Code of Conduct
- I agree to follow the PSF Code of Conduct.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (10 by maintainers)
tables3.5.2 which is the last release with Python 2.7 wheels depends onnumexpr >= 2.6.2. In your situation (by looking at the logs), pip selectsnumexpr2.8.1 which declares a build-time dependency onoldest-supported-numpy. The build step is necessary as this numexpr release has no Python 2.7 wheels.Anyway, it looks like you’ll need to use older versions of these packages. At the bare minimum,
numexpr2.7.3 is the last version to ship with Python 2.7 wheels (which won’t needoldest-supported-numpy)Just because a software is available to download and install does not mean it is supported. Anaconda has stopped supporting Python 2.7, Python Foundation has stopped supporting Python 2.7, PyPA has stopped supporting Python 2.7, RHEL still supports Python 2.7 for the next couple of months but you must pay for that support and they don’t support using pip to install libraries.
It is still possible to use 2.7, but it means you need to support it yourself, so you need to figure out how to install old packages yourself or go to help forums and ask there.
I think the main issue you’re having is pip is trying to resolve packages that are too new to install into Python 2.7. This is a common problem with old Python versions, and there are lots of reasons it can’t be automatically solved.
But there are workarounds, I would recommend you do this:
pypi-timemachinein that conda environment, and read it’s documentationpypi-timemachineset to 2019-12-31 or earlierBy doing this you won’t get any newer packages than what were available on 2019-12-31, which should in general resolve your this particular issue with continuing to use Python 2.7.
Hope this helps and good luck.
Another approach which might have helped here (and might be of use to others hitting similar issues) is to use
--only-binary :all:. This will stop pip from using anything but pre-built wheels. If everything you need still has some Python 2 compatible binary wheel available, then pip would probably be able to find them. And by not allowing builds from source, if you are missing binaries that matter, you’ll get a slightly more understandable message (“could not find a version of foo that is compatible”) in place of a complicated build error traceback.