例如 安装 pyqt5的时候出现:
(env_pytorch) zxzhao@zxzhao:~/anaconda2$ conda install -n env_pytorch pyqt5
Fetching package metadata ...........
PackageNotFoundError: Packages missing in current channels:
- pyqt5
We have searched for the packages in the following channels:
- https://repo.continuum.io/pkgs/main/linux-64
- https://repo.continuum.io/pkgs/main/noarch
- https://repo.continuum.io/pkgs/free/linux-64
- https://repo.continuum.io/pkgs/free/noarch
- https://repo.continuum.io/pkgs/r/linux-64
- https://repo.continuum.io/pkgs/r/noarch
- https://repo.continuum.io/pkgs/pro/linux-64
- https://repo.continuum.io/pkgs/pro/noarch
这个时候,我们可以使用下面的指令来查找我们想要安装的包
anaconda search -t conda skimage
(env_pytorch) zxzhao@zxzhao:~/anaconda2$ anaconda search -t conda pyqt5
Using Anaconda API: https://api.anaconda.org
Packages:
Name | Version | Package Types | Platforms | Builds
------------------------- | ------ | --------------- | --------------- | ----------
abergeron/pyqt5 | 5.4.1 | conda | osx-64 | py27_0
asmeurer/pyqt5 | 5.3.2 | conda | osx-64 | py27_0, py33_0, py26_0, py34_0
astrofrog/pyqt5 | 5.5.0 | conda | linux-64 | py34_0, py35_0, py27_0
avalentino/pyqt5 | 5.3.2 | conda | linux-64, osx-64, win-64 | py27_0, py34_0
bpentz/pyqt5 | 5.6 | conda | win-64 | py35_0
dmazzella/pyqt5 | 5.3.1 | conda | osx-64 | py34_0
dsdale24/pyqt5 | 5.3.2 | conda | linux-64, osx-64, win-64 | py34_0, py27_0
ebenolson/pyqt5 | 5.5.0 | conda | linux-64 | 0, py34_0
ericdill/pyqt5 | 5.4.1 | conda | linux-64 | py27_0
hadim/pyqt5 | 5.4.1 | conda | linux-64 | py34_0
idaholab/pyqt5 | 5.6.0 | conda | linux-64, osx-64 | py27_0
inso/pyqt5 | 5.6 | conda | linux-64, win-32, win-64 | py35_0, py34_0
ipa/pyqt5 | 5.5.0 | conda | linux-armv6l, win-64 | py27_0
jdreaver/pyqt5 | 5.4.1 | conda | linux-64 | py34_0
m-labs/pyqt5 | 5.5.1 | conda | linux-64, win-32, win-64 | py35_0
mmcauliffe/pyqt5 | 5.5.1 | conda | linux-64, win-64, osx-64 | py27_0, py35_0, py34_0
nicoddemus/pyqt5 | 5.4.1 | conda | linux-64 | py34_0, py27_0
nmearl/pyqt5 | 5.5.0 | conda | linux-64, osx-64 | py35_0, py27_0
tballance/pyqt5 | 5.4.1 | conda | linux-armv7l | py35_0
Found 19 packages
Run 'anaconda show ' to get installation details
如上图所示,这里我们找到了多个可用的pyqt5包,如果是使用astrofrog/pyqt5
接着,我们使用show指令来查看该包的详细情况
(env_pytorch) zxzhao@zxzhao:~/anaconda2$ anaconda show astrofrog/pyqt5
Using Anaconda API: https://api.anaconda.org
Name: pyqt5
Summary:
Access: public
Package Types: conda
Versions:
+ 5.5.0
To install this package with conda run:
conda install --channel https://conda.anaconda.org/astrofrog pyqt5
根据提示,我们使用下面的指令install这个包
onda install --channel https://conda.anaconda.org/astrofrog pyqt5
(env_pytorch) zxzhao@zxzhao:~/anaconda2$ conda install -n env_pytorch --channel https://conda.anaconda.org/astrofrog pyqt5
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment /home/zxzhao/anaconda2/envs/env_pytorch:
The following NEW packages will be INSTALLED:
pyqt5: 5.5.0-py27_0 astrofrog
qt5: 5.5.0-0 astrofrog
Proceed ([y]/n)? y
qt5-5.5.0-0.ta 100% |##################################################################################| Time: 0:00:37 914.55 kB/s
pyqt5-5.5.0-py 100% |##################################################################################| Time: 0:00:09 562.82 kB/s
即可。
参考: https://blog.csdn.net/ksws0292756/article/details/79192268