问题
why running
import subprocess
# I'm going to run another python script in anaconda script like this:
#subprocess.call("C:\\ProgramData\\Anaconda3\\Scripts\\activate.bat && python C:\test.py")
# but for simplifying the sample for here I've deleted the second part
# (in the case you didn't install python in the default path, you can replace v_activate_address with the correct address on your computer to see the result)
v_activate_address = "C:\\ProgramData\\Anaconda3\\Scripts\\activate.bat"
subprocess.call(v_activate_address)
gives. (it's not an error):
The system cannot find the path specified.
This code can run my test.py in anaconda environment truly but that line appears which is not desirable. How should I get rid of that?
[the address is correct please don't say that]
answer to @Dunes comment:
来源:https://stackoverflow.com/questions/60642839/subprocess-call-gives-the-system-cannot-find-the-path-specified-while-the-f