I'm very new to python but I've learned the basics and now how it mostly works. I've been trying to install a Django framework for a server so that it can host a webpage.
Basically the problem here is that when I run commands such as:
python3 -V
I get the output
Python 3.6.1
But for some reason when using pip3 it decides to use the pip that is version specific to Python 3.5, for example doing:
pip3 install Django==1.11
installs Django in "/usr/local/lib/python3.5/dist-packages" instead of the Python 3.6 counterpart of the dist-packages directory.
according to python documentations (https://docs.python.org/3/installing/index.html?highlight=pip#work-with-multiple-versions-of-python-installed-in-parallel) I should be able to run this command:
python3.6 -m pip install SomePackage
to use the pip that is specific to Python 3.6, but this doesn't seem to work. I get an error saying "no module named pip" or "no module named pip3".
I am running on a server that uses Ubuntu 16.04
I appreciate all help, thanks in advance! :)
EDIT: I have tried running
pip3 -V
which gave me the output
pip 9.0.1 from /home/user/.local/lib/python3.5/site-packages (python 3.5)
From this I can say that I have no problems at all using python3 with Python 3.6, but when running pip3 it uses pip 9.0.1 from Python 3.5. Also running
sudo apt-get install python3-pip
gives me the output
0 upgraded, 0 newly installed, 0 to remove and 98 not upgraded.
python3.6 -m ensurepip --default-pip
then you can do apip3 install SomePackage
then the files go to the right place. – Eric Leschinski