Neural A*环境安装

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

我有 ubuntu 23.04,我正在尝试安装 e 并按照说明从 https://github.com/omron-sinicx/neural-astar?tab=readme-ov-file 执行神经 A*。我有 python 3.12.1 和命令之后

pip install .[dev]

这是它给我的错误:

Processing /home/sam/Desktop/Tesi/neuralAstar/neural-astar
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of neural-astar[dev] to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement torch==1.12.1 (from neural-astar[dev]) (from versions: 2.2.0, 2.2.1)
ERROR: No matching distribution found for torch==1.12.1

[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: pip install --upgrade pip

我尝试更新 pip,并尝试使用 pip install torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1 --extra-index-url 安装 torch 1.12.1 https: //download.pytorch.org/whl/cpu 并且它有效。我也尝试过使用 conda ( conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cpuonly -c pytorch )但这是输出:

Channels:
 - pytorch
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: - warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides cudatoolkit >=11.6,<11.7 needed by torchvision-0.13.1-py310_cu116

Could not solve for environment specs
The following packages are incompatible
├─ pin-1 is installable and it requires
│  └─ python 3.12.* , which can be installed;
└─ torchvision 0.13.1  is not installable because there are no viable options
   ├─ torchvision 0.13.1 would require
   │  └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
   ├─ torchvision 0.13.1 would require
   │  └─ cudatoolkit >=11.6,<11.7 , which does not exist (perhaps a missing channel);
   ├─ torchvision 0.13.1 would require
   │  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
   ├─ torchvision 0.13.1 would require
   │  └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported;
   └─ torchvision 0.13.1 would require
      └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.12.* (labeled as 'pin-1')

python-3.x pip pytorch artificial-intelligence python-venv
1个回答
0
投票

安装和配置软件环境有时可能很棘手,尤其是在处理依赖项时。让我们解决您在尝试从 官方存储库安装 Neural A* 时遇到的问题。

  1. Torch 版本兼容性

    • 错误消息表明找不到满足 Neural A* 要求的 Torch 版本。
    • 存储库指定 torch==1.12.1,但似乎可以使用版本 2.2.02.2.1
    • 不幸的是,没有可用的 torch==1.12.1 发行版。
    • 您可能需要调整存储库中所需的 Torch 版本或探索替代解决方案。
  2. 点更新

    • 您提到尝试更新pip。虽然保持 pip 保持最新是一种很好的做法,但它并不能直接解决 Torch 版本问题。
    • 要更新 pip,请运行:
      pip install --upgrade pip
      
  3. 火炬安装尝试

    • 您尝试使用以下命令安装 Torch 1.12.1
      pip install torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cpu
      
    • 不幸的是,由于缺少 cudatoolkit 依赖项,这不起作用。
  4. Conda 安装尝试

    • 您还尝试使用 conda 安装 PyTorch 1.12.1
      conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cpuonly -c pytorch
      
    • 但是,这导致了与 cudatoolkittorchvision 相关的 无法满足的错误
  5. 解决冲突:

    • 错误消息表明 torchvision 0.13.1 需要 cudatoolkit >=11.6,<11.7,但该版本不可用。
    • 此外,与固定的 python 3.12.* 版本存在冲突。
    • 不幸的是,torchvision 0.13.1没有可行的选择。
    • 您可能需要考虑使用不同版本的 torchvision 或探索替代库。
© www.soinside.com 2019 - 2024. All rights reserved.