conda "没有名为 wget 的模块";在 conda 安装 wget 之后

编程入门 行业动态 更新时间:2024-10-23 05:35:33
本文介绍了conda "没有名为 wget 的模块";在 conda 安装 wget 之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-04-26 04:01:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1128572.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   conda   quot   wget

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!