10 Respostas
+ 3
go to the python script dir and try running the cmd there
+ 3
it means the file doesnt exist. You cant just provide a filename. Wherever your code is being saved is the current working directory. if you want to reference a file, you should provide the full path from root or C drive
+ 1
with this command, you should be able to see name of your python file in a list:
import os
print([i for i in os.listdir() if ".py" in i])
and then you can get full path of your python file with this command:
print(os.path.abspath("your_file_name.py"))
+ 1
Raphael Thikusho II run this command in your python script
+ 1
Is the file called '3.9.1'? If it is actually named '3.9.1.py' you should refer to it as such.
Also one should not put dots in filenames unless it is for defining file extensions or such errors appear.
Just good programming practice ;)
+ 1
He can try to use Python IDE and run it there... It should be more error-proof way
+ 1
Open cmd as administrator and it will work
0
Slick When I do it like this I still get the same error
0
delete the current file and install it agian
0
Tomáš Konečný should i do this in the cmd??