5๐
โ
You have a conflict between python 2.7 and 3.3.2. You installed django for python 2.7 and certainly tried to used it with python 3.3.2.
The best way to avoid this kind of problem is to use virtualenv:
$ sudo pip install virtualenv
Then:
$ virtualenv my_virtualenv
OR:
$ virtualenv -p <PATH TO PYTHON VERSION> my_virtualenv
Then:
$ source my_virtualenv/bin/activate
$ pip install Django==1.5.2
This will install the good version of django in your virtualenv. You need to check if the python 3 version is available with pip.
Thanks to virtualanv, you will be able to save/freeze and install your environement on another machine:
$ pip freeze > requirement.txt
$ pip install -r requirement.txt
๐คJulio
0๐
Here are the steps that resolved my issue:
Removed Python 3.3 completely from machine.
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.3
sudo rm -rf "/Applications/Python 3.3"
cd /usr/local/bin;
ls -l . | grep '../Library/Frameworks/Python.framework/Versions/3.3' | awk '{print $9}' | xargs rm
And then setup the environment using guide to set Up Python and Install Django on Mac OS X.
๐คCannon
- [Django]-Csrf_token cookie deleted by another site?
- [Django]-How do I specify order of fields in Django form?
- [Django]-How to get Django url correctly?
Source:stackexchange.com