最佳答案
我的 python 在同一个目录中找不到任何模块。 我做错了什么? (python2.7)
因此,我有一个目录“2014 _ 07 _ 13 _ test”,其中包含两个文件:
Where hello.py:
# !/usr/local/bin/python
# -*- coding: utf-8 -*-
def hello1():
print 'HelloWorld!'
Py:
# !/usr/local/bin/python
# -*- coding: utf-8 -*-
from hello import hello1
hello1()
还是蟒蛇给我的
>>> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 4, in <module>
ImportError: No module named hello
怎么了?