首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我的本地机器上的Py手电筒以前版本的安装冲突

我的本地机器上的Py手电筒以前版本的安装冲突
EN

Stack Overflow用户
提问于 2021-02-17 04:24:16
回答 1查看 962关注 0票数 1

我试图在python2.7环境中使用以下conda命令安装PyTorch和Torchvision

conda安装pytorch==1.1.0 torchvision==0.3.0 -c手电筒

但如果你犯了这个错误

代码语言:javascript
复制
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - torchvision==0.3.0 -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']

Your python: python=2.7

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package vs2008_runtime conflicts for:
python=2.7 -> vc=9 -> vs2008_runtime[version='>=9.0.30729.1,<10.0a0']
pytorch==1.1.0 -> ninja -> vs2008_runtime
python=2.7 -> vs2008_runtime

Package zlib conflicts for:
python=2.7 -> sqlite[version='>=3.30.1,<4.0a0'] -> zlib[version='>=1.2.11,<1.3.0a0']
torchvision==0.3.0 -> pillow[version='>=4.1.1'] -> zlib[version='1.2.*|1.2.11|1.2.11.*|>=1.2.11,<1.3.0a0|1.2.8']

我针对特定python 2.7环境的conda列表是

代码语言:javascript
复制
# Name                    Version                   Build  Channel
ca-certificates           2021.1.19            haa95532_0
certifi                   2020.6.20          pyhd3eb1b0_3
pip                       19.3.1                   py27_0
python                    2.7.18               hfb89ab9_0
setuptools                44.0.0                   py27_0
sqlite                    3.30.1               h0c8e037_0
vc                        9                    h7299396_1
vs2008_runtime            9.00.30729.1         hfaea7d5_1
wheel                     0.36.2             pyhd3eb1b0_0
wincertstore              0.2              py27hf04cefb_0

我试图将sqlite升级到3.33.0,但它显示了

所有已安装的请求包。

当我试图卸载sqlite时,整个用于环境的python包正在卸载。请有人帮我做这件事。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-02-17 04:50:47

PyTorch从未为Python2.7构建过PyTorch和TorchVision的这些版本。我们可以使用conda search来实现这一点:

代码语言:javascript
复制
$ conda search 'pytorch[channel=pytorch,subdir=win-64,version=1.1]'
Loading channels: done
# Name     Version    Build                     Channel             
pytorch    1.1.0      py3.5_cuda100_cudnn7_1    pytorch             
pytorch    1.1.0      py3.5_cuda90_cudnn7_1     pytorch             
pytorch    1.1.0      py3.6_cuda100_cudnn7_1    pytorch             
pytorch    1.1.0      py3.6_cuda90_cudnn7_1     pytorch             
pytorch    1.1.0      py3.7_cuda100_cudnn7_1    pytorch             
pytorch    1.1.0      py3.7_cuda90_cudnn7_1     pytorch   

至少您必须使用Python3.5,但是如果您要使用Python3并且需要那些特定的PyTorch版本,您最好跳到Python3.7。

代码语言:javascript
复制
conda create -n pytorch_1_1 -c pytorch python=3.7 pytorch=1.1 torchvision=0.3
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66235746

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档