Python导入错误 - 没有命名的模块

时间:2017-02-26 23:17:46

标签: python import gunicorn

所以我继承了一个烧瓶项目。当我运行命令来检查配置时,尽管安装了软件包,仍会抛出ImportErrror:

jakub@jakub-S300CA:~/Desktop/rankingbrands$ pip install configparser
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already satisfied (use --upgrade to upgrade): configparser in /home/jakub/.local/lib/python3.5/site-packages
jakub@jakub-S300CA:~/Desktop/rankingbrands$ gunicorn --check-config rankingbrands

Error while loading the application:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 144, in run
self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 365, in import_app
__import__(module)
  File "/home/jakub/Desktop/rankingbrands/rankingbrands/__init__.py", line 3, in <module>
import configparser
ImportError: No module named configparser
jakub@jakub-S300CA:~/Desktop/rankingbrands$ gunicorn --check-config rankingbrands

似乎有什么问题?我以为只有在我没有导入包

时才会抛出此错误

0 个答案:

没有答案