我一直在努力学习Django,而且我在部署到Heroku时遇到了一些麻烦。当我尝试运行git push heroku master
时,我得到以下输出
PS E:\My\Git\Directory> git push heroku master
Counting objects: 31, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (26/26), done.
Writing objects: 100% (31/31), 6.71 KiB | 0 bytes/s, done.
Total 31 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! The latest version of Python 3 is python-3.6.2 (you are using
ÿþpython-3.6.2, which is unsupported).
remote: ! We recommend upgrading by specifying the latest version
(python-3.6.2).
remote: Learn More: https://devcenter.heroku.com/articles/python-
runtimes
remote: -----> Installing ÿþpython-3.6.2
remote: ! Requested runtime (ÿþpython-3.6.2) is not available for this
stack (heroku-16).
remote: ! Aborting. More info:
https://devcenter.heroku.com/articles/python-support
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to intense-river-64521.
remote:
To https://git.heroku.com/intense-river-64521.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/intense-river-
64521.git'
在localhost上运行该站点没有问题。我的runtime.txt
仅包含:
python-3.6.2
我认为问题是ÿþ
是runtime.txt
中隐藏的字符,所以我尝试用UTF-8和ANSI编码它,但都没有用。 Visual Studio Code还显示文件中没有隐藏字符。是否有另一个可以指定python运行时的位置?