ubuntu 无法使用pip更新TBB:distutils安装项目

g6baxovj  于 2023-10-17  发布在  其他
关注(0)|答案(1)|浏览(113)

我在我的笔记本电脑上运行了所有PyPi包的完整更新(Ubuntu 22.04,Python 3.9),我已经解决了所有依赖性问题,除了一个:Daal需要一个与我所拥有的不同版本的TBB。我强迫安装Daal只是为了拥有它,因为我猜它的某些用途不会需要TBB。然而,当我尝试不强制安装Daal,或者尝试更新TBB时,我得到以下结果:

`Collecting tbb==2021.* (from daal)
  Obtaining dependency information for tbb==2021.* from https://files.pythonhosted.org/packages/79/a8/01ac205ff1f68f543aa73d69d6947218cd0973992a4b60cf0a4bfe507561/tbb-2021.10.0-py2.py3-none-manylinux1_x86_64.whl.metadata
  Using cached tbb-2021.10.0-py2.py3-none-manylinux1_x86_64.whl.metadata (1.0 kB)
Using cached tbb-2021.10.0-py2.py3-none-manylinux1_x86_64.whl (4.4 MB)
Installing collected packages: tbb
  Attempting uninstall: tbb
    Found existing installation: TBB 0.2
ERROR: Cannot uninstall 'TBB'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.`

我首先尝试使用以下堆栈溢出页面来解决此问题:Link
我卸载了原生安装的libtbb-dev,并重新安装了一个与我的Daal包兼容的版本:

sudo apt install libtbb-dev

这将成功安装libtbb-dev:

The following additional packages will be installed:
  libtbb12 libtbbmalloc2
Suggested packages:
  libtbb-doc
The following NEW packages will be installed:
  libtbb-dev libtbb12 libtbbmalloc2
0 upgraded, 3 newly installed, 0 to remove and 71 not upgraded.
Need to get 325 kB of archives.
After this operation, 1,893 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 libtbbmalloc2 amd64 2021.5.0-7ubuntu2 [49.6 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 libtbb12 amd64 2021.5.0-7ubuntu2 [84.8 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 libtbb-dev amd64 2021.5.0-7ubuntu2 [191 kB]
Fetched 325 kB in 1s (425 kB/s)  
Selecting previously unselected package libtbbmalloc2:amd64.
(Reading database ... 305019 files and directories currently installed.)
Preparing to unpack .../libtbbmalloc2_2021.5.0-7ubuntu2_amd64.deb ...
Unpacking libtbbmalloc2:amd64 (2021.5.0-7ubuntu2) ...
Selecting previously unselected package libtbb12:amd64.
Preparing to unpack .../libtbb12_2021.5.0-7ubuntu2_amd64.deb ...
Unpacking libtbb12:amd64 (2021.5.0-7ubuntu2) ...
Selecting previously unselected package libtbb-dev:amd64.
Preparing to unpack .../libtbb-dev_2021.5.0-7ubuntu2_amd64.deb ...
Unpacking libtbb-dev:amd64 (2021.5.0-7ubuntu2) ...
Setting up libtbbmalloc2:amd64 (2021.5.0-7ubuntu2) ...
Setting up libtbb12:amd64 (2021.5.0-7ubuntu2) ...
Setting up libtbb-dev:amd64 (2021.5.0-7ubuntu2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

但是,这不会改变pip中的错误消息。
我也试过使用easy_install,但我无法让它工作。我用pip安装了它,但我不能将它导入Python,Ubuntu也不识别easy_install作为命令。
什么是TBB 0.2?我在PyPi历史中没有看到这个版本号。

u7up0aaq

u7up0aaq1#

请在oneAPI注册、下载、许可和安装here中提出查询!

相关问题