ERROR: Could not build wheels for lxml, which is required to install pyproject.toml-based projects

PythonThe error during installation lxmlis as follows:

pip install lxml

Insert image description here

My solution, execute the command:

python3 -m pip install --upgrade pip setuptools wheel

Then install it again:

pip install lxml

The installation also reported an error before xlwings, but now it is successful.

 pip install xlwings

If that doesn't work, do the following:

(1) File pythoncorresponding to the next version .whl, download address: https://pypi.org/

(2) Search for the package name (just search for the module you want to install):

Insert image description here

(3) Find the corresponding version and click:

Insert image description here

(4) Click to download:

Insert image description here

(5) Download the corresponding whl file

Insert image description here

(6) Find the path below the file and execute the installation command (my whl file is placed on the desktop, followed by the path and package name of the package):

pip install /Users/sunshiyu/Desktop/lxml-4.9.3-pp39-pypy39_pp73-macosx_11_0_x86_64.whl

If it still can't be solved

You can go here to find solutions to installing packages :
Insert image description here

reference:

Building wheel for lxml (setup.py) … error solved

Guess you like

Origin blog.csdn.net/SSY_1992/article/details/132162056