我是艾涛 2021-11-17 09:57 采纳率: 100%
浏览 168
已结题

mac中的pycharm装lxml一直报错,不知道为啥,有没有遇到过的。

img


Collecting lxml
  Using cached lxml-4.6.4.tar.gz (3.2 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  Using cached lxml-4.6.3.tar.gz (3.2 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  Using cached lxml-4.6.2.tar.gz (3.2 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  Using cached lxml-4.6.1.tar.gz (3.2 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  Using cached lxml-4.6.0.tar.gz (3.2 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  Using cached lxml-4.5.2.tar.gz (4.5 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  Using cached lxml-4.5.1.tar.gz (4.5 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  Using cached lxml-4.5.0.tar.gz (4.5 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: lxml
  Building wheel for lxml (setup.py): started
  Building wheel for lxml (setup.py): finished with status 'error'
  Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml
    Running setup.py install for lxml: started
    Running setup.py install for lxml: finished with status 'error'

  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_fd8ceb5772964de192681edf6a2d3e0d/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_fd8ceb5772964de192681edf6a2d3e0d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-pip-egg-info-6ad3rspv
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_fd8ceb5772964de192681edf6a2d3e0d/
  Complete output (3 lines):
  Building lxml version 4.6.4.
  Building without Cython.
  Error: Please make sure the libxml2 and libxslt development packages are installed.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fe/4c/a4dbb4e389f75e69dbfb623462dfe0d0e652107a95481d40084830d29b37/lxml-4.6.4.tar.gz#sha256=daf9bd1fee31f1c7a5928b3e1059e09a8d683ea58fb3ffc773b6c88cb8d1399c (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_d1412a31d98843ec950a2b7b0d7f728b/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_d1412a31d98843ec950a2b7b0d7f728b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-pip-egg-info-94emgpar
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_d1412a31d98843ec950a2b7b0d7f728b/
  Complete output (3 lines):
  Building lxml version 4.6.3.
  Building without Cython.
  Error: Please make sure the libxml2 and libxslt development packages are installed.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e5/21/a2e4517e3d216f0051687eea3d3317557bde68736f038a3b105ac3809247/lxml-4.6.3.tar.gz#sha256=39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468 (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_75c5052b960641fdbb64f8381deccd56/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_75c5052b960641fdbb64f8381deccd56/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-pip-egg-info-0ezupfvh
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_75c5052b960641fdbb64f8381deccd56/
  Complete output (3 lines):
  Building lxml version 4.6.2.
  Building without Cython.
  Error: Please make sure the libxml2 and libxslt development packages are installed.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/db/f7/43fecb94d66959c1e23aa53d6161231dca0e93ec500224cf31b3c4073e37/lxml-4.6.2.tar.gz#sha256=cd11c7e8d21af997ee8079037fff88f16fda188a9776eb4b81c7e4c9c0a7d7fc (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_18c42e0cd49c43f0beb012aaa97404c5/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_18c42e0cd49c43f0beb012aaa97404c5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-pip-egg-info-g51f6zg3
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_18c42e0cd49c43f0beb012aaa97404c5/
  Complete output (3 lines):
  Building lxml version 4.6.1.
  Building without Cython.
  Error: Please make sure the libxml2 and libxslt development packages are installed.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c5/2f/a0d8aa3eee6d53d5723d89e1fc32eee11e76801b424e30b55c7aa6302b01/lxml-4.6.1.tar.gz#sha256=c152b2e93b639d1f36ec5a8ca24cde4a8eefb2b6b83668fcd8e83a67badcb367 (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_82fc3f9435b2423688a88946b8b55f3a/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_82fc3f9435b2423688a88946b8b55f3a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-pip-egg-info-kmxpubcc
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_82fc3f9435b2423688a88946b8b55f3a/
  Complete output (3 lines):
  Building lxml version 4.6.0.
  Building without Cython.
  Error: Please make sure the libxml2 and libxslt development packages are installed.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/5a/81446fb5a4706bb07a98427634ab93219dc7fa393841d81f5da5c7e151b7/lxml-4.6.0.tar.gz#sha256=8319abacbbe9fd9791c2e3c23deb9b6a16abc0fcbdfcc26722035e865b3d207f (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_bc30bc34ac5f4c79b3a1dd2ac491c187/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_bc30bc34ac5f4c79b3a1dd2ac491c187/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-pip-egg-info-5xe_nb12
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_bc30bc34ac5f4c79b3a1dd2ac491c187/
  Complete output (3 lines):
  Building lxml version 4.5.2.
  Building without Cython.
  Error: Please make sure the libxml2 and libxslt development packages are installed.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2c/4d/3ec1ea8512a7fbf57f02dee3035e2cce2d63d0e9c0ab8e4e376e01452597/lxml-4.5.2.tar.gz#sha256=cdc13a1682b2a6241080745b1953719e7fe0850b40a5c71ca574f090a1391df6 (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_39733d1c23b04631b41bcc1a39c6e4d4/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_39733d1c23b04631b41bcc1a39c6e4d4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-pip-egg-info-z7vwwchu
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_39733d1c23b04631b41bcc1a39c6e4d4/
  Complete output (3 lines):
  Building lxml version 4.5.1.
  Building without Cython.
  Error: Please make sure the libxml2 and libxslt development packages are installed.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz#sha256=27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2 (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1:
   command: /Users/aitao/Desktop/Pythontools/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_a8310be3ac5c4679aea6d460e802d323/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_a8310be3ac5c4679aea6d460e802d323/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-wheel-ja05sw2v
       cwd: /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_a8310be3ac5c4679aea6d460e802d323/
  Complete output (96 lines):
  Building lxml version 4.5.0.
  Building without Cython.
  ERROR: b'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n'
  ** make sure the development packages of libxml2 and libxslt are installed **

    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/aitao/Desktop/Pythontools/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_a8310be3ac5c4679aea6d460e802d323/setup.py'"'"'; __file__='"'"'/private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-install-pxfgiepl/lxml_a8310be3ac5c4679aea6d460e802d323/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/wl/rqdldd7s6j5_t2ztxsyzl1p80000gn/T/pip-record-e70ow8cl/install-record.txt --single-version-externally-managed --compile --install-headers /Users/aitao/Desktop/Pythontools/venv/include/site/python3.10/lxml Check the logs for full command output.

  • 写回答

1条回答 默认 最新

  • 多鱼的夏天 2021-11-17 10:33
    关注

    在终端里运行 xcode-select --install

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 11月25日
  • 已采纳回答 11月17日
  • 创建了问题 11月17日

悬赏问题

  • ¥15 已知隐函数其中一个变量τ的具体值,求另一个变量
  • ¥15 r语言Hurst指数
  • ¥15 Acrn IVSHMEM doorbell问题
  • ¥15 yolov5中的val测试集训练时数量变小问题
  • ¥15 MPLS/VPN实验中MPLS的配置问题
  • ¥15 materialstudio氢键计算问题
  • ¥15 echarts图表制作
  • ¥15 halcon根据玻璃面板纹路取区域
  • ¥15 HFSS设计小型化180度耦合器
  • ¥15 使用CInternetSession,CHttpFile读取网页文件时有些电脑上会卡住怎么办?