简体   繁体   中英

Running python script in powershell

I am trying to run a Pygame in windows 10 Powershell, I have tried using the python programName.py command but it just returns an error telling me that no such file or directory exists, specifically, it says C:\Program Files (x86)\Python36-32\python.exe: can't open file 'spaceshooter.py': [Errno 2] No such file or directory . I don't have admin rights on this computer and I cannot use CMD either.

the problem is that your computer is not able to find the find the solution is to show the computer where it is located(the directory)

go to that folder where u have saved your program and copy the directory then open powershell then type cd (paste the copied directory) then type py programName.py or python programName.py now it should work ✌

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