我试图按照"Getting started on Heroku with Python"上的说明操作,而且我一直试图安装" collectstatic"。当我尝试运行命令python3 manage.py collectstatic
时,我收到了错误页面:
`Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/django/core/management/__init__.py", line 371, in
execute_from_command_line
utility.execute()
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/django/core/management/__init__.py", line 317, in execute
settings.INSTALLED_APPS
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/django/conf/__init__.py", line 106, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in
exec_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
File "/Users/markdenieffe/python-getting-
started/gettingstarted/settings.py", line 14, in <module>
import django_heroku
ModuleNotFoundError: No module named 'django_heroku'`
这是我第一次在现实世界中使用python&#34;如果这是一个简单的答案我很抱歉,但我现在已经把头发撕掉了几天。
我已经转到脚本 init .py并包含from . import *
以查看它所需的模块是否在那里,但没有更改。
我还在manage.py中注释了此错误File "manage.py", line 11, in <module>
所引用的内容,但该程序甚至没有尝试运行。
非常感谢你的帮助。