我是这个领域的新手。我使用django框架开发与谷歌应用程序引擎的Web应用程序。我有一个关于Python的lib目录问题troubleshot ...导入错误:没有名为模块...python django - ImportError:没有名为lib的模块
ROOT
├── lib
│ ├── django
│ ├── pytz
│ ├── wanttousing_lib
│ └── ...
├── mysite
│ ├── __init__.py
│ ├── settings.py
│ ├── controllers.py
│ ├── models.py
│ ├── views.py
│ ├── templates
│ │ └── like
│ │ ├── index.html
│ │ └── _likehelpers.html
│ └── ....
├── test
│ ├── like
│ │ ├── models_tests.py
│ │ └── controllers_tests.py
│ └── ....
├── static
│ ├── css
│ └── js
├── app.yaml
├── manage.py
├── appengine_config.py
└── requirements.txt
在这个目录
,失败的runserver .. 在我的测试代码controllers_tests.py
`from wanttousing_lib import example_module`
导入错误wanttousing_lib ..........
,但如果我移动到wanttousing_lib根目录,它的工作原理.....
ROOT
├── lib
│ ├── django
│ ├── pytz
│
│ └── ...
├── mysite
│ ├── __init__.py
│ ├── settings.py
│ ├── controllers.py
│ ├── models.py
│ ├── views.py
│ ├── templates
│ │ └── like
│ │ ├── index.html
│ │ └── _likehelpers.html
│ └── ....
├── test
│ ├── like
│ │ ├── models_tests.py
│ │ └── controllers_tests.py
│ └── ....
├── static
│ ├── css
│ └── js
├── app.yaml
├── manage.py
├── appengine_config.py
├── requirements.txt
└── wanttousing_lib <--- moved
我该如何解决它?请帮助...
你的'wanttousing_lib'包含'__init __。py'吗? – aircraft
是的。 wanttolib是使用pip安装的twilio。它包含__init__.py。 – Maibi