Doesn't recognize venv of python
See original GitHub issueHi. I noticed that vs-code-runner doesn’t seem to recognize venv environment in python while VS Code’s terminal does so by default.
My purpose is that code runner will recognize python’s venv automatically.
In my case, I created .vscode and venv file on working directory, and more detail is following:
Working Directory:
|---main.py ...etc
|
|--- .vscode
| |--- launch.json
| |--- settings.json
|
|--- venv
|--- bin
|--- include
|--- lib
|--- lib64
|--- pip-selfcheck.json
|--- pyvenv.cfg
I think I need additional setting and tried it again and again with little change,
for example, I noted on settings.json as following:
"code-runner.executorMap": {
"python": "source $workspaceRoot/venv/bin/activate && python",
}
However, I couldn’t achieve it. What should I do for it?
The key bind of this program is fascinating, so I’d like to solve this problem indeed.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
VSCode does not recognize venv - Stack Overflow
1. Open Settings in VSCode. · 2. Search for "python.terminal.activateEnvironment" · 3. If unchecked/unticked, then check/tick for both "User" and ...
Read more >Configure a virtual environment | PyCharm Documentation
The main purpose of virtual environments is to manage settings and dependencies of a particular project regardless of other Python projects.
Read more >Manage Python environments and interpreters - Visual Studio ...
If no environments appear, it means Visual Studio failed to detect any Python installations in standard locations. For example, you might have ...
Read more >Python Virtual Envrironment in VS Code - YouTube
Python #VSCodeSetting up a python virtual environment in VS Code can be tricky, especially selecting the python interpreter appropriate for ...
Read more >Solve Python Virtualenv: is not recognized as an internal or ...
In this tutorial, I would like to show you the python problem solution that “' virtualenv ' is not recognized as an internal...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Too old… but maybe someone else got stuck in Windows, just add this line to your workspace settings:
"code-runner.executorMap": {"python": "call venv\\scripts\\activate.bat && python"}
Good to know you have found a solution. You could try to run it in the VS Code Integrated Terminal:
If your Integrated Terminal is
/bin/bash
, your previous command should work.