Reputation: 622
I am trying to install a specific version of python package tables==2.4.0
for some reasons. But every time I am getting the error
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-tJYQ8o/tables/
.
If I try with pip install tables
, then this works fine and tables package with version 3.4.3 will be installed. But I need specifically 2.4.0
or 2.x
.
I have also checked
https://stackoverflow.com/questions/44981793/python-setup-py-egg-info-failed-with-error-code-1
and
https://stackoverflow.com/questions/35991403/pip-install-returns-python-setup-py-egg-info-failed-with-error-code-1
but didn't get success.I also tried virtualenv, the same error is coming with this version and latest version is working fine.I am using virtualenv for python version 2.7.12
in Ubuntu 14.04. Can anybody suggest me for this issue.
Thanks.
Upvotes: 1
Views: 1026
Reputation: 586
I think the problem is that the version of tables you want to install (2.4.0) is not compatible with the version of numpy you have installed. The incompatibility is due to a bug in setup.py that comes with the tables package.
See the following bug report https://github.com/PyTables/PyTables/issues/601
The person that reported the bug provides a patch here: https://gist.github.com/prehensilecode/2eb790476c38299e520ce5ea40896e08
To try and fix this myself I downloaded the 2.4.0 table package (pip download tables==2.4.0
) and applied the patch to setup.py
I made sure I had the tables dependencies installed (numpy, numexpr and cython), and you will also need to make sure you install the necessary HDF5 files (sudo apt install libhdf5-serial-dev) then I ran:
sudo python setup.py install --hdf5=/usr/lib/i386-linux-gnu/hdf5/serial/
The path to your HDF5 files may be different to mine of course.
import tables
from a python prompt then works
Upvotes: 2