简体   繁体   中英

I cannot run a Sublime Text 3 Python program from Command Prompt

I am going through the Python Crash Course book 2nd Edition and trying to set up Sublime Text 3 programs to run from a terminal. I have made sure Sublime Text is running Python and have saved a simple Print("Hello) program to a file called python_work. Now I try and run the program from Command Prompt, I enter cd Desktop\python_work and I get the answer The system cannot find the path specified. The command prompt should show \Desktop\python_work> and I would contiune from there. Why do I get this message and how can I fix it? (I am using Windows 10)

I was getting The system cannot find the path specified because the location of the python_work folder was not directly located on my desktop , the location was C:\User\Me\OneDrive\Desktop. I either had to move the file directly to my desktop or use the command cd OneDrive\Desktop\python_work . So if you get The system cannot find the path specified go to properties on your folder and check the exact location and try inputting that into command prompt.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM