Comments (5)
Will fix this soon 👍
from vscode.py.
More info, the problem is in build/extension.js file.
Solution: Get current activated virtualenv in VSCode and use that python to run python. Else get python from global environment.
from vscode.py.
Any updates on this? I am building a vscode extension that needs the environment set in vscode. I'm probably going to hack together a solution so I can continue building this out.
I'm happy to contribute to a solution as well. If you want to give me a broad explanation of how you would like to approach this, I can work through it.
from vscode.py.
I think I actually figured out how to resolve this. It comes with only a few minor code changes. It basically works like this:
-
Get the path the current active environment path from the
vscode-python
extension api
https://github.com/microsoft/vscode-python -
When running
extension.py
, replacepython3
with the path to the active python environment.
This seems to work. One other thing I've added is changing the working directory to the workspace directory prior to running the script. The main reason is that I am creating an extension that inspects and runs code in the current workspace.
I can open up one or more PRs for this if that would be helpful.
from vscode.py.
Python is installed in C:\Users\x\AppData\Local\Programs\Python\Python311\python.exe
, but it checked at C:\Python310\python.exe
take path from which python
or where python
command
from vscode.py.
Related Issues (20)
- Add support for creating Color Themes
- Args should be taken as lists instead of strings HOT 2
- Add vscode.Progress
- Improve the docs
- Cogs HOT 1
- Add a way to make us freely edit package.json HOT 2
- Extension is not compatible with Code 1.56. Extension requires ^1.59. Wrong code.exe used. HOT 2
- Rewrite the entire library to be async
- How to get working directory in quick pick? HOT 3
- Error: spawn python ENOENT, on Windows HOT 2
- Get current open file/project HOT 3
- Buggy Example HOT 1
- `main` repo is incomplete HOT 5
- Add support for tree views HOT 1
- Show a message when the user doesn't have python installed to make them install Python
- Lower extension activation time
- Error in setting up the virtual environment... HOT 1
- Raise Not Implemented Error
- Add support for Hover
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.py.