尝试在 Anaconda 环境中安装 Pytorch,但它抛出与 libculas 相关的错误

问题描述 投票:0回答:1

我使用的是 Ubuntu 20.04,所以我可以运行 ROS1 我正在尝试遵循此存储库中的自述文件:https://github.com/SYSU-STAR/H2-Mapping/tree/main?tab=readme-ov-file 我在 bash 中设置了 conda 环境

conda env create -f h2mapping.yaml
conda activate h2mapping 

然后我尝试安装 PyTorch(自述文件中的以下步骤需要 cuda):

conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia --solver=libmamba

它给了我以下错误:

Channels:
 - pytorch
 - nvidia
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package pytorch-cuda-12.1-ha16c6d3_5 requires libcublas >=12.1.0.26,<12.1.3.1, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ libcublas 11.10.3.66.*  is requested and can be installed;
└─ pytorch-cuda 12.1**  is not installable because it requires
   └─ libcublas >=12.1.0.26,<12.1.3.1 , which conflicts with any installable versions previously reported.

有什么不同的想法吗?我尝试过卸载并重新安装cuda,我尝试过在没有安装cuda的情况下下载anaconda,并且我尝试过重新安装anaconda。我还尝试将指向 cuda 安装位置的指针添加到我的 bashrc 中,并且我还尝试删除指向我的 Cuda 安装的任何指针。每次,我都会遇到同样的错误。有什么想法吗?

pytorch anaconda ros ubuntu-20.04
1个回答
0
投票

我能够通过运行命令来安装 pytorch

conda install nvidia/label/cuda-12.1.0::NAMEHERE --solver=libmamba

对于每个有问题的包。

例如,你可以运行

conda install nvidia/label/cuda-12.1.0::libcublas --solver=libmamba

下次运行原始命令时,将显示另一个包错误。几个包之后,安装就跑通了。

© www.soinside.com 2019 - 2024. All rights reserved.