【发布时间】:2015-04-03 08:59:24
【问题描述】:
我不知道为什么我仍然收到ImportError
追溯:
Traceback (most recent call last):
File "./test_jabba.py", line 12, in <module>
from tests import testbench
ImportError: No module named tests
发生错误的地方:
from tests import testbench
from utils import gopher, jsonstream
我的.bashrc有这个
export PYTHONPATH=$PYTHONPATH:/Users/bli1/Development/QE/TrinityTestFramework/poc
但是,当我echo $PYTHONPATH 没有返回任何内容
我也在目录tests 和utils 中添加了__init__.py,但出现同样的错误
【问题讨论】:
-
曾经解决过这个问题吗?我遇到了类似的问题(在 Windows 10 上)。
标签: python importerror pythonpath