python - How to change default version of pip3 from python3.5 to python3.6 -


i'm new python i've learned basics , how works. i've been trying install django framework server can host webpage.

basically problem here when run commands such as:

python3 -v 

i output

python 3.6.1 

but reason when using pip3 decides use pip version specific python 3.5, example doing:

pip3 install django==1.11 

installs django in "/usr/local/lib/python3.5/dist-packages" instead of python 3.6 counterpart of dist-packages directory.

according python documentations (https://docs.python.org/3/installing/index.html?highlight=pip#work-with-multiple-versions-of-python-installed-in-parallel) should able run command:

python3.6 -m pip install somepackage 

to use pip specific python 3.6, doesn't seem work. error saying "no module named pip" or "no module named pip3".

i running on server uses ubuntu 16.04

i appreciate help, in advance! :)

edit: have tried running

pip3 -v 

which gave me output

pip 9.0.1 /home/user/.local/lib/python3.5/site-packages (python 3.5) 

from can have no problems @ using python3 python 3.6, when running pip3 uses pip 9.0.1 python 3.5. running

sudo apt-get install python3-pip 

gives me output

0 upgraded, 0 newly installed, 0 remove , 98 not upgraded. 

i once had similar problem. and, sort out following:

  1. first install pip3 in system

     sudo apt-get install python3-pip 
  2. create virtualenv

     pip3 -p python3.6 virtualenv myenv 
  3. then install djangon in virtualenv after activating it.

     pip3 install django 

you can specify django version as:

  pip3 install django==1.11 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -