I am trying to install a package which uses PEP 517. The newest version of Pip won't allow me to install due to an error involving wheel building for 517.
In the past, I've solved this issue by downgrading Pip, installing the package and Upgrading Pip back to the latest version. However, after I downgrade pip in my virtualenv, if I try to run 'Pip install black' I get the No module named 'pip._internal.cli.main' error.
How can I solve this?
This error came up for the h5py library during the installation of Tensorflow. I checked the h5py documentation to make sure I had the right versions of pip and setuptools, https://pip.pypa.io/en/stable/reference/pip/.
pip install --upgrade pip setuptools wheel
I then checked the error log to identify what has caused h5py to fail while installing backend dependencies. I identified it was the libhdf5.so, where it says "error: libhdf5.so cannot open shared object file: No such file or directory". I installed the library by running:
sudo apt-get install libhdf5-dev
After this, the h5py installed successfully alongside TensorFlow. I've come across similar PEP 517 errors caused by missing dependencies:
The easiest solution to deal with the error
"Could not build wheels for ____ which use PEP 517 and cannot be installed directly"
is the following:
sudo pip3 install _____ --no-binary :all:
Where ____ is obviously the name of the library you want to install.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With