在heroku上部署Django应用程序时出现python模块安装错误

在heroku上部署Django应用程序时出现python模块安装错误,python,django,heroku,Python,Django,Heroku,我正在heroku上部署django应用程序。但是当从requirement.txt文件安装模块时,它会在“Paydunya”模块上返回一个错误。 我正在heroku上部署django应用程序。但是当从requirement.txt文件安装模块时,它会在“Paydunya”模块上返回一个错误 我需要你的帮助来解决这个问题。多谢各位 这是我的requirement.txt文件: six==1.15.0 dj-database-url==0.5.0 Django==3.2 django-advanc

我正在heroku上部署django应用程序。但是当从requirement.txt文件安装模块时,它会在“Paydunya”模块上返回一个错误。 我正在heroku上部署django应用程序。但是当从requirement.txt文件安装模块时,它会在“Paydunya”模块上返回一个错误

我需要你的帮助来解决这个问题。多谢各位

这是我的requirement.txt文件:

six==1.15.0
dj-database-url==0.5.0
Django==3.2
django-advanced-filters==1.3.0
django-allauth==0.44.0
django-appconf==1.0.4
django-braces==1.14.0
django-compressor==2.4
django-crispy-forms==1.11.2
django-debug-toolbar==3.2
django-filter==2.4.0
django-heroku==0.3.1
django-markdown-deux==1.0.5
django-money==1.3.1
django-pagedown==2.2.0
django-rest-framework==0.1.0
django-tastypie==0.14.3
django-tinymce==3.3.0
django-videofield==0.1.1
django-widget-tweaks==1.4.8
djangorestframework==3.12.4
docutils==0.17
fpdf==1.7.2
future==0.18.2
gunicorn==20.1.0
html5lib==1.1
idna==2.10
joblib==1.0.1
Markdown==3.3.4
markdown2==2.4.0
Pillow==8.2.0
Pygments==2.8.1
PyJWT==2.0.1
pyparsing==2.4.7
PyPDF2==1.26.0
python-decouple==3.4
python-dotenv==0.17.0
requests==2.0.1
requests-mock==1.3.0
requests-oauthlib==1.3.0
rjsmin==1.1.0
simplejson==3.17.2
sqlparse==0.4.1
suit==2.0.2
urllib3==1.26.4
virtualenv==20.4.3
whitenoise==5.2.0
xhtml2pdf==0.2.5
paydunya==1.0.6


以下是Heroku CLI:

C:\Users\aba\Desktop\comsoc-ugb>git push heroku master
Enumerating objects: 17, done.
Counting objects: 100% (17/17), done.
Delta compression using up to 4 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 1.33 KiB | 1.33 MiB/s, done.
Total 15 (delta 10), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> No Python version was specified. Using the same version as the last build: python-3.9.4
remote:        To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Requirements file has been changed, clearing cached dependencies
remote: -----> Installing python-3.9.4
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting six==1.15.0
remote:          Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
remote:        Collecting dj-database-url==0.5.0
remote:          Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
remote:        Collecting Django==3.2
remote:          Downloading Django-3.2-py3-none-any.whl (7.9 MB)
remote:        Collecting django-advanced-filters==1.3.0
remote:          Downloading django_advanced_filters-1.3.0-py3-none-any.whl (68 kB)
remote:        Collecting django-allauth==0.44.0
remote:          Downloading django-allauth-0.44.0.tar.gz (572 kB)
remote:        Collecting django-appconf==1.0.4
remote:          Downloading django_appconf-1.0.4-py2.py3-none-any.whl (6.3 kB)
remote:        Collecting django-braces==1.14.0
remote:          Downloading django_braces-1.14.0-py2.py3-none-any.whl (14 kB)
remote:        Collecting django-compressor==2.4
remote:          Downloading django_compressor-2.4-py2.py3-none-any.whl (126 kB)
remote:        Collecting django-crispy-forms==1.11.2
remote:          Downloading django_crispy_forms-1.11.2-py3-none-any.whl (112 kB)
remote:        Collecting django-debug-toolbar==3.2
remote:          Downloading django_debug_toolbar-3.2-py3-none-any.whl (200 kB)
remote:        Collecting django-filter==2.4.0
remote:          Downloading django_filter-2.4.0-py3-none-any.whl (73 kB)
remote:        Collecting django-heroku==0.3.1
remote:          Downloading django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB)
remote:        Collecting django-markdown-deux==1.0.5
remote:          Downloading django-markdown-deux-1.0.5.zip (16 kB)
remote:        Collecting django-money==1.3.1
remote:          Downloading django_money-1.3.1-py3-none-any.whl (33 kB)
remote:        Collecting django-pagedown==2.2.0
remote:          Downloading django_pagedown-2.2.0-py3-none-any.whl (92 kB)
remote:        Collecting django-rest-framework==0.1.0
remote:          Downloading django-rest-framework-0.1.0.tar.gz (969 bytes)
remote:        Collecting django-tastypie==0.14.3
remote:          Downloading django-tastypie-0.14.3.tar.gz (148 kB)
remote:        Collecting django-tinymce==3.3.0
remote:          Downloading django_tinymce-3.3.0-py3-none-any.whl (935 kB)
remote:        Collecting django-videofield==0.1.1
remote:          Downloading django-videofield-0.1.1.tar.gz (3.9 kB)
remote:        Collecting django-widget-tweaks==1.4.8
remote:          Downloading django_widget_tweaks-1.4.8-py2.py3-none-any.whl (11 kB)
remote:        Collecting djangorestframework==3.12.4
remote:          Downloading djangorestframework-3.12.4-py3-none-any.whl (957 kB)
remote:        Collecting docutils==0.17
remote:          Downloading docutils-0.17-py2.py3-none-any.whl (575 kB)
remote:        Collecting fpdf==1.7.2
remote:          Downloading fpdf-1.7.2.tar.gz (39 kB)
remote:        Collecting future==0.18.2
remote:          Downloading future-0.18.2.tar.gz (829 kB)
remote:        Collecting gunicorn==20.1.0
remote:          Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
remote:        Collecting html5lib==1.1
remote:          Downloading html5lib-1.1-py2.py3-none-any.whl (112 kB)
remote:        Collecting idna==2.10
remote:          Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
remote:        Collecting joblib==1.0.1
remote:          Downloading joblib-1.0.1-py3-none-any.whl (303 kB)
remote:        Collecting Markdown==3.3.4
remote:          Downloading Markdown-3.3.4-py3-none-any.whl (97 kB)
remote:        Collecting markdown2==2.4.0
remote:          Downloading markdown2-2.4.0-py2.py3-none-any.whl (34 kB)
remote:        Collecting Pillow==8.2.0
remote:          Downloading Pillow-8.2.0-cp39-cp39-manylinux1_x86_64.whl (3.0 MB)
remote:        Collecting Pygments==2.8.1
remote:          Downloading Pygments-2.8.1-py3-none-any.whl (983 kB)
remote:        Collecting PyJWT==2.0.1
remote:          Downloading PyJWT-2.0.1-py3-none-any.whl (15 kB)
remote:        Collecting pyparsing==2.4.7
remote:          Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
remote:        Collecting PyPDF2==1.26.0
remote:          Downloading PyPDF2-1.26.0.tar.gz (77 kB)
remote:        Collecting python-decouple==3.4
remote:          Downloading python_decouple-3.4-py3-none-any.whl (9.5 kB)
remote:        Collecting python-dotenv==0.17.0
remote:          Downloading python_dotenv-0.17.0-py2.py3-none-any.whl (18 kB)
remote:        Collecting requests==2.0.1
remote:          Downloading requests-2.0.1-py2.py3-none-any.whl (439 kB)
remote:        Collecting requests-mock==1.3.0
remote:          Downloading requests_mock-1.3.0-py2.py3-none-any.whl (33 kB)
remote:        Collecting requests-oauthlib==1.3.0
remote:          Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
remote:        Collecting rjsmin==1.1.0
remote:          Downloading rjsmin-1.1.0.tar.gz (412 kB)
remote:        Collecting simplejson==3.17.2
remote:          Downloading simplejson-3.17.2.tar.gz (83 kB)
remote:        Collecting sqlparse==0.4.1
remote:          Downloading sqlparse-0.4.1-py3-none-any.whl (42 kB)
remote:        Collecting suit==2.0.2
remote:          Downloading suit-2.0.2.zip (8.7 kB)
remote:        Collecting urllib3==1.26.4
remote:          Downloading urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
remote:        Collecting virtualenv==20.4.3
remote:          Downloading virtualenv-20.4.3-py2.py3-none-any.whl (7.2 MB)
remote:        Collecting whitenoise==5.2.0
remote:          Downloading whitenoise-5.2.0-py2.py3-none-any.whl (19 kB)
remote:        Collecting xhtml2pdf==0.2.5
remote:          Downloading xhtml2pdf-0.2.5.tar.gz (100 kB)
remote:        Collecting paydunya==1.0.6
remote:          Downloading paydunya-1.0.6.tar.gz (147 kB)
remote:            ERROR: Command errored out with exit status 1:
remote:             command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xfdyt7z_/paydunya/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xfdyt7z_/paydunya/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-v0w934m8
remote:                 cwd: /tmp/pip-install-xfdyt7z_/paydunya/
remote:            Complete output (7 lines):
remote:            Traceback (most recent call last):
remote:              File "<string>", line 1, in <module>
remote:              File "/tmp/pip-install-xfdyt7z_/paydunya/setup.py", line 70, in <module>
remote:                version=__import__('paydunya').__version__,
remote:              File "/tmp/pip-install-xfdyt7z_/paydunya/paydunya/__init__.py", line 11, in <module>
remote:                import requests
remote:            ModuleNotFoundError: No module named 'requests'
remote:            ----------------------------------------
remote:        ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to comsoc-ugb.
remote:
To https://git.heroku.com/comsoc-ugb.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/comsoc-ugb.git'
C:\Users\aba\Desktop\comsocugb>git-push-heroku-master
枚举对象:17,完成。
计数对象:100%(17/17),完成。
增量压缩最多使用4个线程
压缩对象:100%(15/15),完成。
写入对象:100%(15/15),1.33kib | 1.33mib/s,完成。
总共15个(增量10),重复使用0个(增量0),包重复使用0个
远程:正在压缩源文件。。。完成。
远程:建筑源:
远程:
远程:-->在Heroku-20堆栈上构建
远程:------>使用buildpack:heroku/python
远程:-->检测到Python应用程序
远程:-->未指定任何Python版本。使用与上次构建相同的版本:python-3.9.4
远程:要使用其他版本,请参阅:https://devcenter.heroku.com/articles/python-runtimes
远程:-->需求文件已更改,正在清除缓存的依赖项
远程:-->安装python-3.9.4
远程:-->安装pip 20.2.4、设置工具47.1.1和控制盘0.36.2
远程:-->安装SQLite3
远程:-->带pip的安装要求
远程:收集六个==1.15.0
远程:下载six-1.15.0-py2.py3-none-any.whl(10 kB)
远程:正在收集dj数据库url==0.5.0
远程:下载dj_数据库_url-0.5.0-py2.py3-none-any.whl(5.5 kB)
远程:收集Django==3.2
远程:下载Django-3.2-py3-none-any.whl(7.9 MB)
远程:收集django高级筛选器==1.3.0
远程:下载django_高级_过滤器-1.3.0-py3-none-any.whl(68 kB)
远程:正在收集django allauth==0.44.0
远程:下载django-allauth-0.44.0.tar.gz(572 kB)
远程:正在收集django appconf==1.0.4
远程:下载django_appconf-1.0.4-py2.py3-none-any.whl(6.3KB)
远程:收集django大括号==1.14.0
远程:下载django_大括号-1.14.0-py2.py3-none-any.whl(14 kB)
远程:收集django压缩机==2.4
远程:下载django_compressor-2.4-py2.py3-none-any.whl(126 kB)
远程:收集django crispy表单==1.11.2
远程:下载django_crispy_forms-1.11.2-py3-none-any.whl(112KB)
远程:正在收集django调试工具栏==3.2
远程:下载django_debug_toolbar-3.2-py3-none-any.whl(200 kB)
远程:正在收集django筛选器==2.4.0
远程:下载django_filter-2.4.0-py3-none-any.whl(73 kB)
远程:正在收集django heroku==0.3.1
远程:下载django_heroku-0.3.1-py2.py3-none-any.whl(6.2kb)
远程:收集django markdown deux==1.0.5
远程:下载django-markdown-deux-1.0.5.zip(16 kB)
远程:收集django货币==1.3.1
远程:下载django_money-1.3.1-py3-none-any.whl(33 kB)
远程:正在收集django pagedown==2.2.0
远程:下载django_pagedown-2.2.0-py3-none-any.whl(92 kB)
远程:正在收集django rest框架==0.1.0
远程:下载django-rest-framework-0.1.0.tar.gz(969字节)
远程:正在收集django tastypie==0.14.3
远程:下载django-tastypie-0.14.3.tar.gz(148KB)
远程:正在收集django tinymce==3.3.0
远程:下载django_tinymce-3.3.0-py3-none-any.whl(935 kB)
远程:正在收集django视频字段==0.1.1
远程:下载django-videofield-0.1.1.tar.gz(3.9KB)
远程:收集django小部件调整==1.4.8
远程:下载django_widget_tweaks-1.4.8-py2.py3-none-any.whl(11KB)
远程:收集djangorestframework==3.12.4
远程:下载djangorestframework-3.12.4-py3-none-any.whl(957KB)
远程:正在收集文档==0.17
远程:下载docutils-0.17-py2.py3-none-any.whl(575 kB)
远程:采集fpdf==1.7.2
远程:下载fpdf-1.7.2.tar.gz(39 kB)
远程:收集未来==0.18.2
远程:下载future-0.18.2.tar.gz(829KB)
远程:收集gunicorn==20.1.0
远程:下载gunicorn-20.1.0-py3-none-any.whl(79 kB)
远程:收集html5lib==1.1
远程:下载html5lib-1.1-py2.py3-none-any.whl(112 kB)
远程:正在收集idna==2.10
远程:下载idna-2.10-py2.py3-none-any.whl(58 kB)
远程:正在收集作业库==1.0.1
远程:下载joblib-1.0.1-py3-none-any.whl(303KB)
远程:收集降价==3.3.4
远程:下载Markdown-3.3.4-py3-none-any.whl(97 kB)
远程:正在收集标记2==2.4.0
远程:下载markdown2-2.4.0-py2.py3-none-any.whl(34 kB)
遥控器:收集枕==8.2.0
远程:下载枕头-8.2.0-cp39-cp39-manylinux1_x86_64.whl(3.0 MB)
远程:正在收集Pygments==2.8.1
远程:下载Pygments-2.8.1-py3-none-any.whl(983 kB)
远程:正在收集PyJWT==2.0.1
远程:下载PyJWT-2.0.1-py3-none-any.whl(15 kB)
远程:正在收集pyparsing==2.4.7
远程:下载pyparsing-2.4.7-py2.py3-none-any.whl(67KB)
远程:正在收集PyPDF2==1.26.0
远程:下载PyPDF2-1.26.0.tar.gz(77 kB)
远程:收集python解耦==3.4
远程:下载python_decouple-3.4-py3-none-any.whl(9.5 kB)
远程:正在收集python dotenv==0.17.0
远程:下载python_dotenv-0.17.0-py2.py3-none-any.whl(18 kB)
远程:收集请求==2.0.1
远程:
pip install requests
pip3 install requests