I am trying to import a module into vsCode. I have attached some photos of my current set up right. Things to note:
This results in an import error even though I believe I have taken the correct steps in setting up my python project in vscode. If someone has experienced anything similar can you please provide input on how to solve this issue?
Install code-runner and place code below in settings.json folder
"code-runner.executorMap": {
"python": "python3 -u",
}
"python": "(the python version with modules) -u",
My guess is you never installed the requests module.
You need to do
pip install requests
for Python to find it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.