How to run pip python 3.6 on debian jessie

NOTE: This is not a solution but just a workaround.


If you have installed pip in your debian console and did "pip3 --version", you will meet this message


    "pip 1.5.6 from /usr/lib/python3/dist-packages (python 3.4)"


And this version of pip doesn't allow you to install a lot of packages from python, but there is a workaround. Before we get started, this blog assumes that you have installed python and pip. If you haven't, links down below for installing them. (Note that python 3.6.4 is used)

To start running pip python 3.6, Just follow this steps:

Step 1:
Run "python3.6 -m pip install virtualenv"
Note: Please don't use "pip3 install virtualenv", or you might run into an error (NameError: name 'ModuleNotFoundError' is not defined)

Step 2:
Run "virtualenv -p python3 venv" 

Step 3:
Run ".venv/bin/activate"


Reference:
Virtualenv commands: https://stackoverflow.com/questions/42044346/reinstall-python-2-7-12-and-python-3-5-2
Python: https://www.rosehosting.com/blog/how-to-install-python-3-6-4-on-debian-9/
Pip: https://linuxize.com/post/how-to-install-pip-on-debian-9/

Comments

Popular posts from this blog

Support for the experimental syntax 'decorators' isn't currently enabled (5:3):

How to add environment variables into Heroku container

Running CQL scripts in Cassandra