Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

conda "No module named wget" after conda install wget

Tags:

conda

wget

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) $

See error below:

(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) $
like image 658
tiagoams Avatar asked Nov 15 '19 15:11

tiagoams


1 Answers

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

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..

like image 148
merv Avatar answered Oct 20 '22 19:10

merv