0

I installed pyenv-win in Windows 10 and followed the instructions to set all system variables and it works fine in the cmd.

> python --version
Python 3.10.2

When I try to use VS Code it doesn't recognize any interpreter. I added to my working folder a virtual enviroment that works fine in the cmd but again when I try to use it with VS Code nothing works. Ctrl + Shift + P and select interpreter path does nothing.

I've installed the extensions for Python by Microsoft.

I also tried to set the setting.json with "python.defaultInterpreterPath": "/path/python.exe" but nothing happens.

I tried to run code with right click > run Python file in terminal and it doesn't even try to open the terminal to give me an error. (I hope that the two problems are related.)

I've already uninstalled and reinstalled and it doesn't work. I read the Python Environments page and it told to put in settings "python.useEnvironmentsExtension": true to reveal the icon in the menu. Trying to manage the environments from there, it seems to recognize something but it doesn't load pages and gets stuck in search:

enter image description here

2
  • Did you activate the environment when running it from VS Code? Commented Nov 8 at 14:42
  • @Carcigenicate it doesn't recognize any environment. The only way to make it work is exiting from vscode and use cmd Commented Nov 8 at 16:55

2 Answers 2

0

The problem was caused by the lack of Microsoft Visual C++ Redistributable, once installed everything works perfectly.

Sign up to request clarification or add additional context in comments.

Comments

-3

To solve this try reinstalling the vs code again and make sure you don't have any important projects if you do please back them up or push them to your repo

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.