请注意,我不是计算机人员,只是想通过键入以下内容来安装脚本:
pip install -r requirements.txt
然后这个错误在此过程中出现两次,我不知道为什么:
第一的 :
Compile failed: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitd5e8a29v.c -o tmp/xmlXPathInitd5e8a29v.o
cc tmp/xmlXPathInitd5e8a29v.o -lxml2 -o a.out
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lxml
Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml, chardet, alabaster, urllib3, sphinxcontrib-serializinghtml, Pygments, pockets, imagesize, idna, docutils, beautifulsoup4, sphinxcontrib-websupport, sphinxcontrib-napoleon, requests, sphinx, nyawc
Attempting uninstall: lxml
Found existing installation: lxml 4.9.1
Not uninstalling lxml at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'lxml'. No files were found to uninstall.
Running setup.py install for lxml ... error
error: subprocess-exited-with-error
× Running setup.py install for lxml did not run successfully.
│ exit code: 1
最后是这个:
Compile failed: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitu8wuxket.c -o tmp/xmlXPathInitu8wuxket.o
cc tmp/xmlXPathInitu8wuxket.o -lxml2 -o a.out
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Can't roll back lxml; was not uninstalled
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
我认为这与编译器 gcc 或其他东西有关,因为我已经安装了 lxml。
我将非常感激您的帮助,并提前向您表示感谢。