I have Python 2.7 installed on my machine. I use it in Visual Studio Code (VSC) (MacOS distribution) without problems, but it's hard for me to get Visual Studio code to βseeβ wget .
In my VSC, I added the following import statement to myProject.py :
import wget
Linter says this:
E0401: Unable to import 'wget'
I confirmed that I have wget installed with the following command:
which wget
... which returns ...
/usr/local/bin/wget
I tried reinstalling it with brew install wget , but it says it is already installed. So I tried sudo -H pip install wget , which I think was successfully installed.
Collecting wget Downloading wget-3.2.zip Creating wheels for assembled packages: wget Running setup.py bdist_wheel for wget ... done Saved in: / Var / Root / Library / cache / pip / wheel / 6d / 98/29 / 61ccc41148f871009126c2e844e26f73eeb25e12cca92228a522 Successfully built wget Installing compiled packages: wget Successfully installed wget-3.2
I closed VSC and reopened it. I keep getting this error in linter:
E0401: Unable to import 'wget'
I recently installed and uninstalled anaconda , and I am sure that this is the source of my suffering. I do not regularly work with Python, but I believe that I am working on a project where it is quite convenient. I have no ideas: how to solve this problem. I welcome your suggestions, and I thank you for reading.
Update:
This question describes the problem I am facing. I tried the suggested solutions, and none of them seemed to save me from the linter error.
Updating my .bash_profile will have no effect:
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
source share