【发布时间】:2018-11-08 20:52:32
【问题描述】:
当我尝试使用 Heroku 部署我的 Django REST API 时,我得到了这个:
-----> Python app detected
Using supported version of Python 3.6 (python-3.6.6)
-----> Installing python-3.6.6
-----> Installing pip
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting Python==3.5.1 (from -r /tmp/build_eff222df1413c9c747fe9d073117baf7/requirements.txt (line 1))
Could not find a version that satisfies the requirement Python==3.5.1 (from -r /tmp/build_eff222df1413c9c747fe9d073117baf7/requirements.txt (line 1)) (from versions: )
No matching distribution found for Python==3.5.1 (from -r /tmp/build_eff222df1413c9c747fe9d073117baf7/requirements.txt (line 1))
! Push rejected, failed to compile Python app.
! Push failed
如何设置我的 requirements.txt 以使其正常工作?我使用了一个虚拟环境,我在其中安装了这个:
django,
djangorestframework,
django-rest-auth,
django-filter,
django-cors-headers,
我正在使用 python 3.5 和 django 2.0.1
【问题讨论】: