前面有一些问题,最值得注意的是,但是他们没有帮助我。我试图安装llvm版本10 (或9),因为它是这个pyodPython包的依赖项。在尝试安装时,我会得到以下错误:
(.venv) user@desktop:/media/Projects/outliers$ pip install llvmlite
Collecting llvmlite
Using cached https://files.pythonhosted.org/packages/0b/96/07bfa93a103fb9e3e9ae7f9f7c6687ae714aee66b6f3000da3fad71e0aa2/llvmlite-0.34.0.tar.gz
Building wheels for collected packages: llvmlite
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command /media/Projects/outliers/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a4jzbt70/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpzu8welrdpip-wheel- --python-tag cp36:
running bdist_wheel
/media/Projects/outliers/.venv/bin/python3 /tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py
LLVM version... 6.0.0
Traceback (most recent call last):
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 191, in
main()
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 143, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '6.0.0'. Be sure to set LLVM_CONFIG to the right executable path.
Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
error: command '/media/Projects/outliers/.venv/bin/python3' failed with exit status 1
----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
Running setup.py install for llvmlite ... error
Complete output from command /media/Projects/outliers/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a4jzbt70/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xelmdsmd-record/install-record.txt --single-version-externally-managed --compile --install-headers /media/Projects/outliers/.venv/include/site/python3.6/llvmlite:
running install
running build
got version from file /tmp/pip-build-a4jzbt70/llvmlite/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
running build_ext
/media/Projects/outliers/.venv/bin/python3 /tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py
LLVM version... 6.0.0
Traceback (most recent call last):
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 191, in
main()
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 143, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '6.0.0'. Be sure to set LLVM_CONFIG to the right executable path.
Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
error: command '/media/Projects/outliers/.venv/bin/python3' failed with exit status 1
----------------------------------------
Command "/media/Projects/outliers/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a4jzbt70/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xelmdsmd-record/install-record.txt --single-version-externally-managed --compile --install-headers /media/Projects/outliers/.venv/include/site/python3.6/llvmlite" failed with error code 1 in /tmp/pip-build-a4jzbt70/llvmlite/我相信最重要的是:
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '6.0.0'. Be sure to set LLVM_CONFIG to the right executable path.如果有人试图更新它,它说6.X是最新的:
user@desktop:~$ apt install llvm
Reading package lists... Done
Building dependency tree
Reading state information... Done
llvm is already the newest version (1:6.0-41~exp5~ubuntu1).
The following packages were automatically installed and are no longer required:
boinc-client golang-1.10-go golang-1.10-src golang-src libboinc7 libgsoap-2.8.60 libllvm10 libllvm10:i386 libnvidia-cfg1-440 libnvidia-common-435 libnvidia-common-440
libnvidia-compute-440 libnvidia-decode-440 libnvidia-ifr1-440 libvncserver1 linux-headers-4.15.0-106 linux-headers-4.15.0-106-generic linux-headers-4.15.0-115
linux-headers-4.15.0-115-generic linux-headers-5.4.0-45-generic linux-hwe-5.4-headers-5.4.0-45 python-fasteners python-monotonic python-pexpect python-ptyprocess
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.我还尝试过1) 使用它们的apt deb源 (没有工作,添加时什么都没有发生,使用apt upgrade时最新版本仍然是6.X ),以及2) 下载他们的文件 (没有给出安装说明)。
发布于 2020-10-23 02:46:03
我是在薄荷19.3,但这也应该适用于Ubuntu18.04,这是这个薄荷版本的基础。
我的解决方案是指定在安装时具体使用的版本:
sudo apt-get install llvm-10*在这里使用glob星号的原因是,一些相关的包也是工作所需的,因此仅仅安装基本包将无法工作(至少,对于pyod不会起作用,当您尝试pip安装时,它会给您llvm-config: error: component libraries and shared library)。这是后续问题和解决方案在这里提到过.
在此之后,您需要更改llvm-config链接,否则它仍然指向6.X版本。这由(从这里开始)完成:
sudo -i
cd /usr/bin
rm llvm-config #if it exists already, which probably it does
ln -s llvm-config-10 llvm-config配置现在指向正确的版本。安装10版本不会更新此指针。在此之后,我的pip命令起作用了(即pip install llvmlite,然后是pip install pyod)。
发布于 2023-04-05 19:44:45
llvm.org现在提供了一个安装脚本来安装最新的稳定版本。
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
在我的系统(仿生)上,我得到了一个包含文本The following packages have unmet dependencies: libdb4.8++ : Depends: libgcc-s1 (>= 3.0) but it is not installable的错误,但是按照这里的修复,https://bitcoin.stackexchange.com/questions/98872/depends-libgcc-s1-3-0-but-it-is-not-installable-bitcoind-wallet-dependency并成功地重新运行。
https://askubuntu.com/questions/1286131
复制相似问题