Cannot deploy Django project on Heroku from a Ubuntu 18.04 laptop

39 views
Skip to first unread message

Mo-rema07

unread,
Oct 22, 2018, 8:22:05 AM10/22/18
to Django users
Hello people,

Can I please get help? I am a noob using a Lenovo V110 running Ubuntu 18.04. I am getting an  error that I am using python 3.6.5 instead of 3.6.6. However when I check the python version using "python3 --version" I find that my version is 3.6.6. Can someone please help I have been struggling with this issue for about 2 weeks and I cannot find the solution online.

Thank you
python-version.png
heroku_output.png

TimT Vogt

unread,
Oct 22, 2018, 8:41:50 AM10/22/18
to django...@googlegroups.com
Python 3.6.5 is not supported. You need to downgrade to supported python version or deploy to python anywhere

Verstuurd vanaf mijn iPhone

Op 22 okt. 2018 om 14:20 heeft Mo-rema07 <mmafan...@alustudent.com> het volgende geschreven:
U
Hello people,

Can I please get help? I am a noob using a Lenovo V110 running Ubuntu 18.04. I am getting an  error that I am using python 3.6.5 instead of 3.6.6. However when I check the python version using "python3 --version" I find that my version is 3.6.6. Can someone please help I have been struggling with this issue for about 2 weeks and I cannot find the solution online.

Thank you

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7dc30e45-81f9-4ce0-8635-814651c3e340%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<python-version.png>
<heroku_output.png>

Akash Purandare

unread,
Oct 22, 2018, 11:36:48 AM10/22/18
to Django users
You can use Pipenv to specify the version of python to Heroku. Personally, I have used upto Python 3.7 to deploy my Django projects, seems to work best with Pipenv

Gear Crew

unread,
Oct 22, 2018, 11:52:40 AM10/22/18
to Django users
without deploy run this page and show the same error 

TimT Vogt

unread,
Oct 22, 2018, 11:57:49 AM10/22/18
to django...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Andréas Kühne

unread,
Oct 22, 2018, 1:24:51 PM10/22/18
to django...@googlegroups.com
The problem you are having has nothing to do with the python version. What heroku is saying is that you should change to python 3.6.6 which you do by adding a file to the project - see https://devcenter.heroku.com/articles/deploying-python.

The problem you are getting (and that hinders you from installing your application) is that you are using a python 2.7 compatible plugin (Cheetah) - that doesn't have any python 3 code. The error is that the code is not python 3 compatible. (the syntax error you are getting at the end shows this) - to install a Cheetah that you can use, install cheetah3.

Regards,

Andréas


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Mo-rema07

unread,
Oct 24, 2018, 6:27:14 AM10/24/18
to Django users
Thanks, I installed cheetah3 and I am no longer getting the same error message. However, regardless of the python version in my pipfile or requirements.txt Hereku installs python-3.6.5 What could be the reason for this?

Andréas Kühne

unread,
Oct 24, 2018, 2:51:16 PM10/24/18
to django...@googlegroups.com
Hi again,

Great that you get it running. 

The reason for it not upgrading the python version is that you need to specify it in a special way on Heroku. I had the same problem - you just need to look at the following:

Add a file called runtime.txt, add the following contents:
python-3.6.6

Regards,

Andréas


Reply all
Reply to author
Forward
0 new messages