我的 python 在同一目錄中找不到任何模塊。我做錯了什麼?(python2.7)
所以我有一個目錄“2014_07_13_test”,其中有兩個文件:
- test.py
- hello.py
where hello.py:
# !/usr/local/bin/python # -*- coding: utf-8 -*- def hello1(): print "HelloWorld!"
and test.py:
# !/usr/local/bin/python # -*- coding: utf-8 -*- from hello import hello1 hello1()
仍然python給出我
>>> Traceback(最近一次調用最後):文件“<stdin>”,第 1 行,在 <module> 文件“<string>”,行4、在<module> ImportError: No module named hello
什麼問題?