我有 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')
安装和配置软件环境有时可能很棘手,尤其是在处理依赖项时。让我们解决您在尝试从 官方存储库安装 Neural A* 时遇到的问题。
Torch 版本兼容性:
点更新:
pip install --upgrade pip
火炬安装尝试:
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
Conda 安装尝试:
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cpuonly -c pytorch
解决冲突: