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.
-
Does running `import django` in the Python console do anything? – Blender Jun 23 '12 at 01:29
-
This post should help. [Duplicate][1] [1]: http://stackoverflow.com/questions/739993/get-a-list-of-installed-python-modules – rh0dium Jun 23 '12 at 01:52
-
@Mike_G are you using the default `python` or your own installed version? eitherway check out `/Library/Python/2.6/site-packages/` to see what packages you have installed. – Samy Vilar Jun 23 '12 at 02:24
3 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.

- 675
- 1
- 9
- 19
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.

- 1,976
- 13
- 15
-
Thanks! I installed Django in every possible way on the first 3 pages of google, so I probable did it manually at least once or twice. – sinθ Jun 23 '12 at 21:10
Check out virtualenv and virtualenvwrapper

- 51
- 1
-
-
It's a mechanism of isolating Python environments. A clean environment is created by cloning the system's Python interpreter in a a directory of your choice. Then, when that environment is activated, all package installs will occur within this environment, without affecting the system python libraries or other environments you have created. That way you can, for instance, develop your project using the stable version of Django in one environment, testing it in another environment with the in-development version of Django to test new features of the framework, etc. – Armando Pérez Marqués Jun 23 '12 at 12:19