显然,conda无法找到一些非常常见的软件包:我在做什么错? [英] Apparently conda cannot find some very common packages: what am I doing wrong?
问题描述
环境:我在具有高Sierra的Mac上使用conda
4.6.7.
我有一些旧的Python代码,首先我想运行它.当然,由于这是研究代码,所以我没想到会找到花哨的东西(!!)",例如测试套件,但我希望至少提供一个requirements.txt
文件.白日梦.对组成项目的各个文件中的import
列表进行GREP删除后,我想到了要安装的以下软件包列表:
conda install os sys math time scipy numpy zipfile urllib.request shutil PIL skimage config itertools logging json re random collections matplotlib visualize glob random datetime tensorflow keras colorsys IPython
根据
,我将所有这些都放在一个对conda
的调用中
您应该
在此环境中安装所需的所有程序. 同时.一次安装1个程序可能会导致依赖性 冲突.
(顺便说一句,有没有办法在命令中包含换行符,还是必须那么长?)
但是,conda
给我错误:
PackagesNotFoundError: The following packages are not available from current channels:
- config
- math
- visualize
- datetime
- urllib.request
- re
- logging
- json
- os
- glob
- collections
- sys
- colorsys
- itertools
- random
- zipfile
- time
- shutil
- skimage
在我看来这很奇怪,因为至少其中一些非常普遍.这些是我的conda
环境中的软件包:
# Name Version Build Channel
ca-certificates 2019.1.23 0
certifi 2018.11.29 py36_0
libcxx 4.0.1 hcfea43d_1
libcxxabi 4.0.1 hcfea43d_1
libedit 3.1.20181209 hb402a30_0
libffi 3.2.1 h475c297_4
ncurses 6.1 h0a44026_1
openssl 1.1.1b h1de35cc_0
pip 19.0.3 py36_0
python 3.6.8 haf84260_0
readline 7.0 h1de35cc_5
setuptools 40.8.0 py36_0
sqlite 3.26.0 ha441bb4_0
tk 8.6.8 ha441bb4_0
wheel 0.33.1 py36_0
xz 5.2.4 h1de35cc_4
zlib 1.2.11 h1de35cc_3
我该如何解决以上问题?
其中大多数软件包(例如math
,random
,itertools
....)都是requirements.txt file would be provided. Pipe dream. After GREPping the list of import
s across the various files composing the project, I came up with the following list of packages to be installed:
conda install os sys math time scipy numpy zipfile urllib.request shutil PIL skimage config itertools logging json re random collections matplotlib visualize glob random datetime tensorflow keras colorsys IPython
I put all of them in a single call to conda
, because, according to
you should
Install all the programs that you want in this environment at the same time. Installing 1 program at a time can lead to dependency conflicts.
(btw, is there a way to include a line break in the command, or does it have to be that long?)
However, conda
is giving me the error:
PackagesNotFoundError: The following packages are not available from current channels:
- config
- math
- visualize
- datetime
- urllib.request
- re
- logging
- json
- os
- glob
- collections
- sys
- colorsys
- itertools
- random
- zipfile
- time
- shutil
- skimage
This seems weird to me, because at least some of them are very common. These are the packages in my conda
environment:
# Name Version Build Channel
ca-certificates 2019.1.23 0
certifi 2018.11.29 py36_0
libcxx 4.0.1 hcfea43d_1
libcxxabi 4.0.1 hcfea43d_1
libedit 3.1.20181209 hb402a30_0
libffi 3.2.1 h475c297_4
ncurses 6.1 h0a44026_1
openssl 1.1.1b h1de35cc_0
pip 19.0.3 py36_0
python 3.6.8 haf84260_0
readline 7.0 h1de35cc_5
setuptools 40.8.0 py36_0
sqlite 3.26.0 ha441bb4_0
tk 8.6.8 ha441bb4_0
wheel 0.33.1 py36_0
xz 5.2.4 h1de35cc_4
zlib 1.2.11 h1de35cc_3
How can I solve the above problem?
Most of those packages (e.g. math
, random
, itertools
....) are part of the python standard library, so should be available with any standard installation of python (even if they don't show up in the output of conda list
). Conda therefore does not install these separately or have them in its package lists.
Other issues with your attempt are with the names of packages. For instance, you are trying to install scikit-image
, but using the shortform name skimage
(which is used once it is installed for import, e.g. import skimage
). If you use conda install scikit-image
, conda will find it.
这篇关于显然,conda无法找到一些非常常见的软件包:我在做什么错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!