Reputation: 567
Im using anaconda
to install packages and manage my environments on macOS Mojave 10.14.2.
I installed a new package wget
at the terminal
conda install wget
When I run conda list
the package shows up and I get no errors.
However, when I run
import wget
In spyder
or jupyter notebook
I get and error:
File "<ipython-input-28-1d5f1c9c9a6b>", line 7, in <module> import
wget ModuleNotFoundError: No module named 'wget'
The package also shows up in my base(root) environment, so I have no idea why spyder
or jupyter notebook
can't find the package.
Upvotes: 1
Views: 1508
Reputation: 21
Your command conda install wget
installs wget for use at the conda prompt. To install wget for import in Python, you need to install a different package:
conda install -c anaconda pywget
In Python it's still:
import wget
Upvotes: 2
Reputation: 32
in conda prompt run this command and import , it will work
conda install -c anaconda wget
Upvotes: 0