我正在关注Django OAuth 工具包教程。我在安装了 Django OAuth Toolkit 的本地服务器上成功运行了该应用程序。
当我尝试部署到 Heroku 时,我在运行“$ python manage.py collectstatic --noinput”时收到“ModuleNotFoundError: No module named 'oauth2_provider'”错误。
我曾尝试在 Stack Overflow 上搜索类似的问题,但没有找到。我在 Stack Overflow 上看到了很多与 collectstatic 相关的问题,但我认为这不是我的问题。
我的回溯是这样的:
remote: -----> Python app detected
remote: -----> Installing requirements with pip
remote:
remote: -----> $ python manage.py collectstatic --noinput
remote: Traceback (most recent call last):
remote: File "manage.py", line 10, in <module>
remote: execute_from_command_line(sys.argv)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
remote: utility.execute()
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 337, in execute …Run Code Online (Sandbox Code Playgroud)