我正在使用一个名为报纸的库并将我的应用程序部署到弹性 beantalk。它在本地运行良好,但在服务器上它不起作用并抛出此错误:
File "/opt/python/current/app/application.py", line 7, in <module>
from api.v01.api import apiv01
File "/opt/python/current/app/api/v01/api.py", line 19, in <module>
from newspaper import Article
File "/opt/python/run/venv/lib/python2.7/site-packages/newspaper/__init__.py", line 10, in <module>
from .article import Article, ArticleException
File "/opt/python/run/venv/lib/python2.7/site-packages/newspaper/article.py", line 12, in <module>
from . import images
ImportError: cannot import name images
两台机器都运行 python 2.7.9。
问题可能是什么?
只是为了确认一下,我正在使用 requirements.txt 来加载依赖项,并且它们在两台机器上都加载得很好。