I installed a library inside a virtual environment using venv
in Visual Studio Code, then imported it into a Python file. However, when I run the file, I get a ModuleNotFoundError.
Attempted steps and checks:
venv\Lib\site-packages
.Oddities:
which python
in Bash returns /c/Users/Lyndon/Documents/VS Code/seatmap_parser/\Users\Lyndon\Documents\VS Code\seatmap_parser\venv/Scripts/python
when it should presumably return C:\Users\Lyndon\Documents\VS Code\seatmap_parser\venv\Scripts\python
. "python.pythonPath": "${workspaceRoot}/venv/Scripts/python"
to workspace settings.json
raises this error: The Python path in your debug configuration is invalid.
I stand ready to check for any missed details upon request. Why isn't it working?
If you want to get OUTPUT just clicking run
in a specified file, then you have to go user settings. Enter your python path in "code-runner.executorMap
" dict after "python" key. If not specified just type code-runner.executorMap
and it will generate that dict for you.
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.