Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run xxx' " in 1.65.00 VSCode

Today I run my python(.py) file as usual,but the terminal shows a new problem which I cannot solve for a long time. Explicitly,I used to click Run Python File,

enter image description here

but the terminal shows that like this:

enter image description here

I then tried another two ways to run my python,such as "run code"(code runner provides),debug(python plugin together with "run python file"),and it shows that: enter image description here enter image description here.

It is obvious that except the "debug",other two both fail to run,showing "ModuleNot..."(while actually the module exists in the vir env). All codes are easy:

print('Hello World')
import os

print(os.path.abspath(__file__))
import numpy as np
like image 244
Walter Avatar asked Sep 15 '25 12:09

Walter


2 Answers

go to vscode Extensions market and search "python". right click on "Python"(published by microsoft) and click on "Install another version". select a version that previously worked for you - usually just the one back before the current one.

like image 161
gluttony47 Avatar answered Sep 17 '25 02:09

gluttony47


Faced with the same issue.Solved by adding the following line

python.terminal.activateEnvironment" : false

to the settings.json file of the visual code

like image 31
Lenin B Avatar answered Sep 17 '25 03:09

Lenin B