Running 2.7 python project with python 3.7

24 views
Skip to first unread message

Luka Nik

unread,
Feb 13, 2020, 4:55:05 AM2/13/20
to django...@googlegroups.com
Is there a way to run a project with python 3.7 if it's written with python 2.7?
And what are my options if not?
Cheers,
Luka

Nick Sarbicki

unread,
Feb 13, 2020, 5:05:19 AM2/13/20
to Django users
There is no natural reason as to why the project wouldn't run in python 3.7 unless you have written it in a way that is incompatible with 3.7

I would suggest simply trying to run it in python3.7 and seeing if you have any errors. Do you have a test suite with high coverage? Run that in 3.7 - it should be pretty revealing. On top of this

Otherwise there are guides online, including some advice here: https://portingguide.readthedocs.io/en/latest/tools.html

I can recommend using pylint --py3k on your code as well, it will immediately tell you of anything which won't work in 3.x.

If the code does not work in 3.7, your options are to rewrite the code so that it does.


- Nick


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMqinds9QRA_7x5cJ4AbfzzsEpARH7NxUxYWWVf7m%3DaJD7RRMQ%40mail.gmail.com.

Kasper Laudrup

unread,
Feb 13, 2020, 5:05:37 AM2/13/20
to django...@googlegroups.com
Hi Luka,
The short answer is "it depends", the longer answer depends on you
providing some more details, especially which kind of project you're
talking about (are you able to modify the project to support Python 3 etc.).

Anyway, you'll probably have much more success if you ask your question
(with more details) on a mailing list/forum dedicated to Python
development. This is a mailing list for Django users.

Kind regards,

Kasper

Luka Nik

unread,
Feb 13, 2020, 5:24:21 AM2/13/20
to django...@googlegroups.com
Thank you very much.

Yeah, I overlooked that this is only django. My bad 

Luka

--
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.
Reply all
Reply to author
Forward
0 new messages