披露:我不知道我在做什么。
我得到了以下错误。无法导入设置'mvp_landing.settings‘(它在sys.path上吗?设置文件中是否存在导入错误?):没有名为dj_database_url的模块
我已经查找了这个答案,大多数都指向查看sys.path文件,并将设置文件放入其中一个路径中。
/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
/Library/Python/2.7/site-packages^^我不知道这些文件的位置,也不知道如何将我的设置文件移动到这些路径中。
发布于 2015-02-02 05:12:28
使用pip安装dj_database_url模块
发布于 2015-02-02 05:11:16
这个错误确切地解释了发生了什么:没有名为"dj_database_url“的模块,这意味着您还没有安装它。
为此,您需要将该行放入requirements.txt文件中。如果你在本地运行,你可以执行pip install dj_database_url。
https://stackoverflow.com/questions/28267870
复制相似问题