Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

After installing anaconda3 in windows, I can run python commands from the anaconda prompt, but not from the windows command prompt. I would like to make a desktop shortcut to activate my environment and run spyder from it. Previously, I would do this with a .bat file, but now that I cannot run python commands from cmd.exe this doesn't work.

Is there an alternative way of running batch files for the anaconda prompt? I know that I could just modify my PATH to get cmd.exe to run python commands, but I'd like to avoid this if possible.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
782 views
Welcome To Ask or Share your Answers For Others

1 Answer

I believe all the Anaconda prompt does is open CMD and run a batch file. Make the first command of your script:

call <anaconda_dir>/Scripts/activate.bat <anaconda_dir>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...