If you plan to upgrade Django from a past version, you need to delete the old version of Django first and then install the new version. The following article mainly introduces you to the method of reinstalling Django after uninstalling it. The article gives detailed steps. Friends in need can refer to it. Let’s take a look together.
Preface
Everyone should have experienced that different Django versions may be used in different projects. Compatibility is a big problem. If unfortunately you have to take over different version of the project is more tragic!
If you want to reinstall a Django version, you need to uninstall it first and then install it.
Uninstall
First find the django installation path
Python import sys; sys.path = sys.path[1:]; import django; print(django.path)
Get
django installation directory ['/ Library/Python/2.7/site-packages/django']
Delete the django directory
After installation
you can reinstall it
If you use Python egg to install Django, delete the Django ``.egg`` file directly,
and delete the egg in ``easy-install.pth`` Quote That’s it.
This file should be found in the ``site-packages`` directory
[Related recommendations]
2. Python basic introductory tutorial
3. Application of Python in data science
The above is the detailed content of Detailed steps to reinstall Django. For more information, please follow other related articles on the PHP Chinese website!