0

I am trying to use the Interactive window of VSCode, but it loads the wrong version of Python. I want it to load the version of the virtual environment (shown bottom left), but it defaults to something else.

I have tried this approach, but I can't simply click the version and change it because it isn't included in the drop down list. I have tried adjusting the settings.json file python.defaultInterpreterPath but that didn't work (perhaps my syntax is wrong). I have also made sure that jupyter is installed in the virtual environment.

I always run VSCode in the project folder from the command line using code . but strangely, something that has worked is running it using code (without the period). This is not a solution however, because the workspace folder is not updated, meaning that when I change the project I'm working on, VSCode opens in previous workspace.

image description

1 Answer 1

1

You can try to delete all the files and folders under this location:

C:\Users\${UserName}\AppData\Roaming\Code\User\globalStorage

Others:

The python interpreter of the .ipynb file was stored in the database located at:

C:\Users\${UserName}\AppData\Roaming\Code\User\workspaceStorage

Such as:

enter image description here

If you open a new .ipynb file in the VSCode which name has not storaged in the database, you will need to select the interpreter.

It's different from the interactive. You can find, any time you reopen the VSCode, the last time you created interactive will be disappear.

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

1 Comment

@Lawrence Please let me know the result.

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.