Point Django in different versions of Python

A Django application requires a later version of Python. I just set it to 2.5(from 2.4), and now when I do pythonon the command line, it says 2.5.2.

Having said that, Django still speaks Python Version: 2.4.3.

How to fix it? I reloaded / restarted / redistributed to no avail.

+3
source share
3 answers

You have it back.

Django is being added to the Python environment.

When you install new Python, you must reinstall everything - including Django - for the new Python.

Once you have the new Django in the new Python, your settings PATHdetermine which Python you are using.

Python ( PYTHONPATH) , Django .

+6

Django? , Python - python2.5 manage.py runserver.

, mod_python mod_wsgi, Python, . , , Python.

+4

django /usr/bin/env python IIRC.
, , ( python), . , , . (, CentOS) .

0
source

Source: https://habr.com/ru/post/1723864/


All Articles