[Fixed]-Download django 1.10 to python 3.5

0👍

Try using:

pip3 install Django or even pip3.5 install Django

This is what I used, as pip alone picks up python2 pip. I have Django installed for both python2 and python3.

👤SimonM

1👍

You created your virtualenv with Python 2.7. You should first create a virtualenv with Python 3.5

virtualenv -p <path/to/python3.5> <path/to/new/virtualenv>

Then activate this new virtualenv, and finally, run pip install django on the virtualenv with Python 3.5

You can have as many virtual environments as you wish, but each virtualenv can only hold a single Python installation; if you don’t specify a Python interpreter, the default one will be used to create the virtualenv (in your case, the default is 2.7)

0👍

the easiest to install any version of Django and python(linux) is by installing virtualenvwrapper for python:
here we go, first open your console
and type following command:
1- sudo pip install virtualenvwrapper
2-→ which virtualenvwrapper.sh
/usr/local/bin/virtualenvwrapper.sh(in my case)

   3-which virtualenvwrapper_lazy.sh

/usr/local/bin/virtualenvwrapper_lazy.sh

After this I had to configure a couple of things. First of all I have created a directory for the Python Virtual Environments:
mkdir ~/.virtualenvs

have also added an environment variable to my shell. I use bashshell,then
If you are using a standard shell, like bash, you need to add the configuration to your ~/.bashrc file.

export WORKON_HOME=$HOME/.virtualenvs
I also had to add a command to the ~/.bashrc to run the activation script when my shell starts:
–> source /usr/local/bin/virtualenvwrapper_lazy.sh
Finally to create a new virtual environment, for example if you want to create mytest virtualenvironment ,you just need to type this command from the terminal:

mkvirtualenv mytest

and that’s all

Leave a comment