Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell if you have multiple Django's installed

In the process of trying to install django, I had a series of failures. I followed many different tutorials online and ended up trying to install it several times. I think I may have installed it twice (which the website said was not a good thing), so how do I tell if I actually have multiple versions installed? I have a Mac running Lion.

like image 218
sinθ Avatar asked Jun 23 '12 01:06

sinθ


2 Answers

open terminal and type python then type import django then type django and it will tell you the path to the django you are importing. Goto that folder [it should look something like this: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/] and look for more than one instance of django(if there is more than one, they will be right next to each other). Delete the one(s) you don't want.

like image 173
lciamp Avatar answered Sep 21 '22 04:09

lciamp


You could install yolk - it will list all your python packages if you call it ('yolk -l')

Also it is worth while looking into virtualenv as maxi suggested. It basically allows you to have different python configurations (i.e. packages installed...) and makes it easy to switch between them.

Additionally, it seems you might have been installing django manually. I would suggest checking out pip and setuptools (aka easy_install), two very popular python package management utilities.

like image 20
ryuusenshi Avatar answered Sep 21 '22 04:09

ryuusenshi