我一直犯这个错误。我就是不能在终端上打开脚本。我的idle和python控制台正常工作。我不想复制并粘贴行到我的空闲。 我认为python在错误的路径上搜索。。。在
我有ubuntu,请看下面我复制粘贴的终端
judy@ubuntu:~$ cd anotherproject
judy@ubuntu:~/anotherproject$ python hello.py
python: can't open file 'hello.py': [Errno 2] No such file or directory
judy@ubuntu:~/anotherproject$ cd
judy@ubuntu:~$ cd Scripts
bash: cd: Scripts: No such file or directory
judy@ubuntu:~$ cd Desktop
judy@ubuntu:~/Desktop$ cd Scripts
judy@ubuntu:~/Desktop/Scripts$ python passwordgenerator.py
python: can't open file 'passwordgenerator.py': [Errno 2] No such file or directory
judy@ubuntu:~/Desktop/Scripts$ ls
gemail.py hello.py passwordgenerator.py
judy@ubuntu:~/Desktop/Scripts$
这是我的你好.py文件
^{pr2}$
~/Desktop/Scripts/
中,而不是在~/anotherproject
中。尝试python ~/Desktop/Scripts/hello.py
ls -alh
并显示输出。在相关问题 更多 >
编程相关推荐