如何在conda中强制安装某个包
有的时候安装某个包时,需要更新其依赖的某些包,如下:PS C:\Users\liguanlin\Desktop> conda install torchtextFetching package metadata .................Solving package specifications: .Package plan for installation in en...
有的时候安装某个包时,需要更新其依赖的某些包,如下:
PS C:\Users\liguanlin\Desktop> conda install torchtext
Fetching package metadata .................
Solving package specifications: .
Package plan for installation in environment D:\Anaconda3:
The following NEW packages will be INSTALLED:
tbb: 2019.4-h74a9793_0 defaults
tbb4py: 2019.4-py36h74a9793_0 defaults
torchtext: 0.4.0-pyhb384e40_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
The following packages will be UPDATED:
cudatoolkit: 9.0-1 defaults --> 10.1.243-h74a9793_0 defaults
pytorch: 1.1.0-py3.6_cuda90_cudnn7_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch --> 1.3.1-py3.6_cuda101_cudnn7_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
Proceed ([y]/n)?
因为我的cuda是9.0的版本,所以更新后很大可能cuda不能使用了。先尝试如下命令:
PS C:\Users\liguanlin\Desktop> conda install torchtext --no-update-deps
Fetching package metadata .................
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- cudatoolkit 9.0 1
- torchtext
Use "conda info <package>" to see the dependencies for each package.
如果不行。可以使用如下命令:
PS C:\Users\liguanlin\Desktop> conda install torchtext --force
Fetching package metadata .................
Solving package specifications: .
Package plan for installation in environment D:\Anaconda3:
The following NEW packages will be INSTALLED:
torchtext: 0.4.0-pyhb384e40_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
Proceed ([y]/n)? y
torchtext-0.4. 100% |###############################| Time: 0:00:00 791.51 kB/s
PS C:\Users\liguanlin\Desktop>
查看一个包的依赖情况:
PS C:\Users\liguanlin\Desktop> conda info torchtext
Fetching package metadata .................
torchtext 0.4.0 pyhb384e40_1
----------------------------
file name : torchtext-0.4.0-pyhb384e40_1.tar.bz2
name : torchtext
version : 0.4.0
build string: pyhb384e40_1
build number: 1
channel : https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
size : 40 KB
arch : None
has_prefix : False
license : BSD
md5 : e8292705541ab1a49026bf4e3196af68
noarch : python
platform : None
requires : ()
subdir : noarch
timestamp : 1565277734783
url : https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/noarch/torchtext-0.4.0-pyhb384e40_1.tar.bz2
dependencies:
numpy >=1.11
python
pytorch >=1.2
requests
six
tqdm
更多推荐
所有评论(0)