I'm trying to install Django 1.5 to my Python 3.3 installation, but installing it either manually or via pip installs it to my (Mountain Lion) Mac's Python 2.7 folder. How can I force it to install for 3.3?
1 Answer
I would recommend using a virtual environment, and use the -p flag to specify which python you wish to use
$ virtualenv -p /usr/local/bin/python3.3 <virtual_env>
Or
$ virtualenv --python=/opt/python-3.3/bin/python ENV
Just change the path to Python accordingly
4 Comments
vaindil
I saw the
virtualenv tool on Django's installation page, but is it really necessary? Why not just install it normally? (Honest question, not saying it's dumb or anything.)karthikr
I believe it is a good idea to use virtualenv as it would keep things local (What if you want to spin up another project with django 1.6 and not bother to change anything in this project)? This is another good read on why virtual environments
vaindil
That makes a lot of sense. I'll go with this then. Thank you!
NedStarkOfWinterfell
Umm, then what? I create the virtual env with path to my Python 33 executable, then what?