问题描述
限时送ChatGPT账号..Conda 似乎已将包 wget 作为二进制文件安装在/bin 中,但未安装在环境的站点包中:
Conda seems to have installed package wget as a binary in /bin but not in the environment's site-packages:
$ 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) $
推荐答案
wget
程序不同于 Python 包 wget
.后者名为 python-wget
,可以从 Conda Forge
The program wget
is distinct from the Python package wget
. The latter goes by the name python-wget
and can be installed from Conda Forge
conda install -n geo conda-forge::python-wget
这是包含来自多种编程语言的包的通用包管理器的固有问题之一.我所看到的工作约定是在出现冲突时预先添加语言.Python包经常得到py-
或python-
,R得到r-
等等.
This is one of the inherent problems with having a generic package manager that includes packages from many programming languages. The working convention that I've seen is prepending the language whenever there is a conflict. Python packages often get py-
or python-
, R gets r-
, etc..
这篇关于conda "没有名为 wget 的模块";在 conda 安装 wget 之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论