
Use the interactive menu to select which version you would like to use as the default. You may then run update-alternatives with the -config option so that you may select which version you want to choose to be the default $ sudo update-alternatives -config python Sudo update-alternatives -install /usr/bin/python python /usr/bin/python3.5 2 I do not know what has happened because this used to work fine but I'm now experiencing a problem where I am running python2.7 but for some reason pip is installing in my python 3.5 dist-packages.

#Install pip for python 2.7 and python 3 install#
For example, to install version 2.7.3 of the Snowflake Connector for Python, run: pip install snowflake-connector-python2.7.3. where version is the version of the connector that you want to install.
img file with OpenCV 3 + Python 2.7 and OpenCV 3 + Python 3 pre-configured and pre-installed, then be sure to take a look at the Quickstart Bundle and Hardcopy Bundle of Practical Python and OpenCV. To install the connector, run the following command: pip install snowflake-connector-pythonThis will fail to upgrade pip or install packages since you do not have access to certain directories on the server. If you do not create a virtualenv using a custom version of Python 2, pip will use the system version. To upgrade the version of pip, you must be using a virtualenv. If you are interested in a pre-configured Raspbian. Once thats created and activated, you can use the pip command.
#Install pip for python 2.7 and python 3 how to#
Run these two commands first, but make sure the python versions match what you have on your computer sudo update-alternatives -install /usr/bin/python python /usr/bin/python2.7 1 To install Python 2.7 pip, use the following ones: sudo apt install curl curl -output get-pip.py sudo python2 get-pip.py pip2 -version or pip -version. This blog post covers how to install OpenCV bindings for both Python 2.7 and Python 3.

If setting up virtual environments is not what you want to do, then you can also use update-alternatives to switch between python version. Note: pip 21.0, in January 2021, removed Python 2 support, per pip’s Python 2 support policy. Switching between python versions using update-alternatives:

Now that you have pip installed you can refer to the instructions at this link to learn how to setup these virtual environments for testing various python versions and packages (to install pip3 for python3, use this command sudo apt install python3-pip) You can also setup virtual python environments using pip. As Hugo stated in the comment above, python3 should already be installed and you can run it by using python3 in the terminal as he mentioned.
