django 2 under python 2

88 views
Skip to first unread message

Andy

unread,
Jan 25, 2018, 4:39:43 PM1/25/18
to Django users
Hi!

pip inside a python2 virtualenv will try to install django 2, which aint working and will fail.
I wonder why this is happening because for instance if i install ipython in that same virtualenv pip wont try to install version 6.x because its marked as python3 only. It seems django 2 is missing some soft of flag that is present at the ipython package and tells pip to install the old ipython 5.5 rather than anythin above that.

Does anyone know whats causing this?

Avraham Serour

unread,
Jan 25, 2018, 4:42:37 PM1/25/18
to django-users
I wonder why this is happening...
because django 2 doesn't support python 2

I suggest using python 3.6

--
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+unsubscribe@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/eed0e673-56e9-476b-9030-b81a18c531a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mirek Zvolsky

unread,
Jan 25, 2018, 7:07:38 PM1/25/18
to Django users
Isn't the question a little oposite, Avraham ??



Dne čtvrtek 25. ledna 2018 22:42:37 UTC+1 Avraham Serour napsal(a):
I wonder why this is happening...
because django 2 doesn't support python 2

I suggest using python 3.6
On Thu, Jan 25, 2018 at 9:50 PM, Andy <kaku...@gmail.com> wrote:
Hi!

pip inside a python2 virtualenv will try to install django 2, which aint working and will fail.
I wonder why this is happening because for instance if i install ipython in that same virtualenv pip wont try to install version 6.x because its marked as python3 only. It seems django 2 is missing some soft of flag that is present at the ipython package and tells pip to install the old ipython 5.5 rather than anythin above that.

Does anyone know whats causing this?

--
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.

Nick Sarbicki

unread,
Jan 26, 2018, 2:14:15 AM1/26/18
to django...@googlegroups.com

Looks like a pypi "feature". You should pin your dependencies.


James Bennett

unread,
Jan 26, 2018, 2:23:55 AM1/26/18
to django...@googlegroups.com
You should be seeing a message like this:

    ==========================
    Unsupported Python version
    ==========================

    This version of Django requires Python 3.4, but you're trying to
    install it on Python 2.7.

    This may be because you are using a version of pip that doesn't
    understand the python_requires classifier. Make sure you
    have pip >= 9.0 and setuptools >= 24.2, then try again:

        $ python -m pip install --upgrade pip setuptools
        $ python -m pip install django

    This will install the latest version of Django which works on your
    version of Python. If you can't upgrade your pip (or Python), request
    an older version of Django:

        $ python -m pip install "django<2"

Which is output by Django when an install is attempted on Python 2.

Andy

unread,
Jan 26, 2018, 5:51:05 AM1/26/18
to Django users
okay after digging a little bit more yesterday i found out why this is happening ..

its fixed in 2.0.1, but maybe they will be able to reupload 2.0

Just to be clear: i know that django 2 aint working under python2, but its a pain to setup cross version testing if "pip install django" under pthon2 will just fail whereas "pip install ipython" will just install the latest compatible release (5.5.x) and wont even bother to download 6.x which is correctly marked as python3 only. So i already knew that django2 could be hidden from python2, just wondered why its not behaving correctly.

Just trying to install django under python2 you will notice, that pip wil not bother to download the fixed django 2.0.1 .. but sadly it will install the incompatible 2.0 and fail ..

But the django folks are at it .. until then my travis config will be a little bit more complicated than it has to be. :(

Andy

unread,
Jan 29, 2018, 9:22:13 AM1/29/18
to Django users
its fixed now .. you can savely install django under python2 again :)
Reply all
Reply to author
Forward
0 new messages