I've downloaded the requests library with pip install, and I can use it on my command line, and with python's IDLE but not in vscode.
Here is the code from vsc:
import requests
requests.__version__
Here is the error thrown out:
Traceback (most recent call last):
File "/Users/abdourahman/Desktop/webscrape/igscrape.py", line 1, in <module>
import requests
ImportError: No module named requests
When run on cmd & IDLE it runs as intended:
Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>
>>> requests.__version__
'2.23.0'
To reiterate I'd like figure out to access external libraries in my ide. I've run into the same problem with vscode & atom, and with the bs4 library along with requests.
Problem was the Code Runner extension I was running source code in vscode out of. Turned it off and it defaulted to running python out of the terminal in vscode which solved the problem of not being able to find the modules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With