gpt4 book ai didi

python - PyTorch 安装要求 python=3.1 。 Python版本安装: 3. 10.0

转载 作者:行者123 更新时间:2023-12-04 18:37:09 25 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Conda reports PackagesNotFoundError: python=3.1 for reticulate environment

(2 个回答)


4个月前关闭。



(pgqa) raphy@pc:~/pythonMatters/PathGenerator$ conda install pytorch torchvision torchaudio cpuonly -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

- python=3.1

Current channels:

- https://conda.anaconda.org/pytorch/linux-64
- https://conda.anaconda.org/pytorch/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.


(pgqa) raphy@pc:~/pythonMatters/PathGenerator$ python3 --version
Python 3.10.0
尝试使用 pip 安装 PyTorch 但出现以下错误:
(pgqa) raphy@pc:~/pythonMatters/PathGenerator$ pip3 install torch==1.10.0+cpu 
torchvision==0.11.1+cpu torchaudio==0.10.0+cpu -f https://download.pytorch.org
/whl/cpu/torch_stable.html
Looking in links: https://download.pytorch.org/whl/cpu/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.10.0+cpu (from versions: none)
ERROR: No matching distribution found for torch==1.10.0+cpu
操作系统:Ubuntu 20.04
点子版本:
(pgqa) raphy@pc:~$ pip --version
pip 21.2.4 from /home/raphy/anaconda3/envs/pgqa/lib/python3.10/site-packages/pip (python 3.10)
(pgqa) raphy@pc:~$ pip3 --version
pip 21.2.4 from /home/raphy/anaconda3/envs/pgqa/lib/python3.10/site-packages/pip (python 3.10)
python 版本:
(pgqa) raphy@pc:~$ python --version
Python 3.10.0
如果最新的稳定 python 版本是 3.10 ,为什么它要求 python3.1 ?
如何解决问题?

最佳答案

Conda 4.10 与 python 3.10 不兼容。
您无法使用 conda 安装许多软件包的原因是 conda 4.10 具有处理 python 3.10 的已知错误。将您的 conda 更新到 4.11 或将您的 python 恢复到 3.9 或更早版本。 Read more here in this SO answer.
作为一种解决方法,您仍然可以尝试使用 pip。

关于python - PyTorch 安装要求 python=3.1 。 Python版本安装: 3. 10.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70154524/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com