简体   繁体   中英

Uninstalling old version Django for upgrade to latest version

I want to upgrade Django from 1.2.5 to 1.3. I uninstalled 1.2.5 version, by the Ubuntu Software Center, for future upgrading, but it still in dist-packages and it still imported in python shell. What should I do? Would it be normal if I would brutally deleted the folder and egg from dist-packages? It runs on Ubuntu 10.04

Go to the /usr/local/lib/python2.6/dist-packages . Find django folder there and delete it. then download django 1.3 and run python setup.py install . This should do the trick.

I recommend using setup-tools. Then run

easy_install --upgrade django

It will remove current django path from PYTHON_PATH and will add it's own path. To get easy_install do:

apt-get install python-setuptools

For both actions sudo is needed.

Remove django version using pip :

pip uninstall django

And install the version you want, for example 1.5:

pip install django==1.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM