Python Heroku推送失败,因为它可以';找不到模块allauth

Python Heroku推送失败,因为它可以';找不到模块allauth,python,django,heroku,Python,Django,Heroku,我正在尝试将Django应用程序推送到Heroku。我在尝试推送到heroku时遇到以下错误 remote: -----> Building on the Heroku-20 stack remote: -----> Using buildpack: heroku/python remote: -----> Python app detected remote: -----> Using Python version specified in runtime.txt re

我正在尝试将Django应用程序推送到Heroku。我在尝试推送到heroku时遇到以下错误

remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing python-3.7.10
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote:        Installing dependencies from Pipfile.lock (a6086c)...
remote: -----> Installing SQLite3
remote: -----> $ python manage.py collectstatic --noinput
remote:        Traceback (most recent call last):
remote:          File "manage.py", line 22, in <module>
remote:            main()
remote:          File "manage.py", line 18, in main
remote:            execute_from_command_line(sys.argv)
remote:          File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
remote:            utility.execute()
remote:          File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
remote:            django.setup()
remote:          File "/app/.heroku/python/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
remote:            apps.populate(settings.INSTALLED_APPS)
remote:          File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/registry.py", line 91, in populate
remote:            app_config = AppConfig.create(entry)
remote:          File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/config.py", line 90, in create
remote:            module = import_module(entry)
remote:          File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
remote:            return _bootstrap._gcd_import(name[level:], package, level)
remote:          File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
remote:          File "<frozen importlib._bootstrap>", line 983, in _find_and_load
remote:          File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
remote:        ModuleNotFoundError: No module named 'allauth'
remote:
remote:  !     Error while running '$ python manage.py collectstatic --noinput'.
remote:        See traceback above for details.
remote:
remote:        You may need to update application code to resolve this error.
remote:        Or, you can disable collectstatic for this application:
remote:
remote:           $ heroku config:set DISABLE_COLLECTSTATIC=1
remote:
remote:        https://devcenter.heroku.com/articles/django-assets
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !   Push rejected.
remote:
我能够在本地主机上完美运行该应用程序。当我试图上传到heroku上时,它只会抛出这个错误

My settings.py将allauth作为已安装的应用程序包含

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    # social login
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.google',
    # custom apps
    'main',
    'video'
]
Heroku正在使用
Pipfile
安装依赖项。调整您的
Pipfile
或删除它,使其使用
requirements.txt


Heroku正在使用
Pipfile
安装依赖项。调整您的
Pipfile
或删除它,使其使用
requirements.txt

您的虚拟环境中是否安装了
django allauth
?看起来Heroku没有安装您的
requirements.txt
文件中的任何内容。您的文件结构是什么?您的虚拟环境中是否安装了
django allauth
?看起来Heroku没有安装您的
requirements.txt
文件中的任何内容。你的文件结构是什么?删除pipfile&pipfile.lock成功了。非常感谢:)删除pipfile&pipfile.lock成功了。非常感谢:)
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    # social login
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.google',
    # custom apps
    'main',
    'video'
]
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing python-3.7.10
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote:        Installing dependencies from Pipfile.lock (a6086c)...