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?
Mad Physicist
106k25 gold badges180 silver badges261 bronze badges
asked Sep 24, 2020 at 2:22
4
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.
answered Sep 24, 2020 at 3:50
Sean PayneSean Payne
1,5651 gold badge6 silver badges19 bronze badges
4
This solution from this link helped me:
pip install --upgrade pip setuptools wheel
answered Jun 27, 2022 at 22:47
Sometimes this can be due to a cache issue and the no-binary flag won’t work. In which case try pip install <insert package names> --no-cache-dir.
This seems to be a frequent issue when installing packages with python. First, check to ensure you have activated the virtualenv you think you’re supposed to be in, then check to see if you have wheels pkg (pip install wheel if not). If those fail then the –no-cache-dir or –no-binary flags come into play. Reading the pypi documentation on each package could help as well. Best of luck!
answered May 7, 2021 at 20:27
KevinGKevinG
1092 silver badges5 bronze badges
Posting an answer as reference for future searchers here.
I tried installing Pillow and got this error. Tried many different approaches, none of them worked.
Then i downgraded Python (From 3.9) to 3.8 and just tried installing by pip again, then it worked.
If it fails for you, try downgrading Python, and it may work.
answered Dec 9, 2020 at 14:46
2
When I ran into this error, the problem was that the package I was pulling had its metadata configured incorrectly, which caused building the wheels to fail.
To find that error I ran, pip --verbose install <my_package> Which let me see what about the wheel build was failing, and fix it upstream.
answered Jul 22, 2021 at 6:05
0
try this:
pip3 install –upgrade pip
answered Mar 17 at 17:19
On OSX setting SYSTEM_VERSION_COMPAT=1 in my environment prior to running pip solved it:
export SYSTEM_VERSION_COMPAT=1
answered Apr 26, 2022 at 11:17
I have also encountered the same issue when uninstalling and reinstalling miniconda.
I have no idea why, but in my registry key ComputerHKEY_CURRENT_USERSOFTWAREMicrosoftCommand Processor AutoRun has been set to if exist. I deleted the value then it worked fine just as before.
person_v1.32
2,5511 gold badge13 silver badges26 bronze badges
answered Sep 9, 2021 at 2:38
Источник
I am building a library that follows standard practices when it comes to development, testing and release (using tox and pytest, setup.cfg, etc). Sometime this morning, I suddenly started getting the following error when I attempt to run my tests and I am stumped as to the root cause.
Building wheels for collected packages: python-step-series
Building wheel for python-step-series (PEP 517): started
Building wheel for python-step-series (PEP 517): finished with status 'done'
Created wheel for python-step-series: filename=python_step_series-0.0.2.dev1.post1.dev0_g1f5fc90.d20211206-py3-none-any.whl size=17943 sha256=6db044ba1828101d1ecd7f27be55a42b63711d537a6ea01d4935eaa4122655ef
Stored in directory: /home/user/.cache/pip/wheels/46/6f/be/601a51d80e3889cae97cbe8b1a98cc4be1004f1e97546d94ef
WARNING: Built wheel for python-step-series is invalid: Metadata 1.2 mandates PEP 440 version, but '0.0.2.dev1.post1.dev0-g1f5fc90.d20211206' is not
Failed to build python-step-series
ERROR: Could not build wheels for python-step-series which use PEP 517 and cannot be installed directly
Подробнее ...