trouble installing Django

I tried to install Django with
pip install Django==3.0.7

but I get

Could not find a version that satisfies the requirement Django==3.0.7

I am using pip 9.0.1

You probably have an old, unsupported Python version

Django 3.0 release notes | Django documentation | Django says:

Django 3.0 supports Python 3.6, 3.7, and 3.8.

You probably want to upgrade your Python, so you can use the latest Django.

You should also upgrade pip, we’re on the 20.x series of pip now.

Thanks. I will try to upgrade pip.

I think I do have newish version of python

Stephens-MBP:~ westland$ python --version
Python 2.7.10
Stephens-MBP:~ westland$ python3 --version
Python 3.8.3

I upgraded pip to ver 20.1.1 so that was worth doing anyway. However, when I try
westland$ pip install Django==3.0.7
I still get

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement Django==3.0.7

So it is like it is not recognising I have python 3 installed. Yet, when I type

which python3

I get

/Library/Frameworks/Python.framework/Versions/3.8/bin/python3

Try using the pip3 command
pip3 install Django==3.0.7

1 Like

brilliant - that worked. Much appreciated.

I’d also suggest looking into setting up a virtual environment for your Python / Django development work. Among other benefits, it tends to help avoid/prevent issues like this.

(Side note: I only very rarely use a Mac - I’ve got a MacBook that is my “travel” laptop, which only gets used 3-5 days / year for development work. Less so in 2020 at this point. Many others will be able to give you better / more specific information about that platform and how to do this if you have questions.)

1 Like

Hi
I am using Python 3.6, Pip 21.3.
I want to upgrade Django version from 3.0 to 4. I tried using pip install -U Django
But I am getting an error.
Please help me.

If you’re having specific issues that aren’t directly related to the original post here, I would suggest you open up a new topic as to not potentially confuse the conversation. (On the other hand, this is a nearly-three year old thread, so there’s not a lot of chance on that - other than the people who have previously responded to this thread may get notified of the new message on it.)

However, I will briefly point out that based on FAQ: Installation | Django documentation | Django, Django 4 doesn’t support anything earlier than Python 3.8. You’ll need to install a newer version of Python and will want to set up a new virtual environment to use Django 4+.