Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named wget

Tags:

python

macos

wget

Please help me to find reason on MacOS why when I including library

import wget

I'm getting error

File "/Users/xx/python/import.py", line 4, in <module>
    import wget
ImportError: No module named wget

This library is installed

xx$ pip3 install wget
Requirement already satisfied: wget in /usr/local/lib/python3.6/site-packages (3.2)

I just suppose that some path is not set, but I don't know how to prove this.

Please help me find solution for this problem.

like image 385
Stefano Avatar asked Jun 27 '18 18:06

Stefano


3 Answers

Try pip install wget, maybe you’re using python 2

like image 65
Norhther Avatar answered Sep 22 '22 18:09

Norhther


sudo apt-get install --reinstall python3-wget
like image 44
Alex Dimofte Avatar answered Sep 24 '22 18:09

Alex Dimofte


With pip3 you are installing module for python 3, It can b that you have both versions of python 2 and 3 and you your environment is pointing default to python 2

Check python version or install wget for python 2

python -V    
pip install wget
like image 39
Muhammad Rehman Avatar answered Sep 25 '22 18:09

Muhammad Rehman