C:\Python27\python.exe: can't open file '2.py': [Errno 2] No such file or directory
生活随笔
收集整理的這篇文章主要介紹了
C:\Python27\python.exe: can't open file '2.py': [Errno 2] No such file or directory
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近開始學習了“笨方法學python”,在練習的第一個程序就出現了如下錯誤:
C:\Python27\python.exe: can’t open file ‘2.py’: [Errno 2] No such file or directory。
剛開始自己找了好長時間,也在網上查閱了好多資料,都沒能解決,最后發覺原來是自己新建的xxx.py文件并不是像我們看到的是.py后綴的,它的后面有兩層后綴,xxx.py.txt其中.txt的后綴隱藏了我們有時候會看不到。這時候在Dos界面輸入dir 查看自己新建的.py文件所在文件夾下所有的文件以及文件類型,確保文件確實是.py結尾的。
總結
以上是生活随笔為你收集整理的C:\Python27\python.exe: can't open file '2.py': [Errno 2] No such file or directory的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: TCP/IP协议是什么
- 下一篇: 笨方法学python之import sy