Conda似乎已将wget软件包作为二进制文件安装在/ bin中,但未在环境的站点软件包中安装:
$ conda activate geo
(geo) $ find /home/tams00/anaconda3/envs/geo/bin/ -name "wget*"
/home/tams00/anaconda3/envs/geo/bin/wget
(geo) $ find /home/tams00/anaconda3/envs/geo/lib/ -name "wget*"
(geo) $
看到以下错误:
(geo) $ conda --version
conda 4.7.12
(geo) $ python --version
Python 3.7.3
(geo) $ which python
/home/tams00/anaconda3/envs/geo/bin/python
(geo) $ conda install wget
Collecting package metadata (repodata.json): done
Solving environment: done
# All requested packages already installed.
(geo) $ conda list wget
# packages in environment at /home/tams00/anaconda3/envs/geo:
#
# Name Version Build Channel
wget 1.20.1 h20c2e04_0
(geo) $ python -c "import wget"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'wget'
(geo) $
答案 0 :(得分:2)
程序wget
与Python软件包wget
不同。后者的名称为python-wget
,可以从Conda Forge安装
conda install -n geo conda-forge::python-wget
这是拥有包含来自多种编程语言的软件包的通用软件包管理器的固有问题之一。每当发生冲突时,我所见的工作惯例就是在该语言之前添加该语言。 Python软件包通常会得到py-
或python-
,R会得到r-
,依此类推。