Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to install python 2

$ sudo apt install python2
OR
$ sudo apt install python-minimal #is working

Comment

Install Python2 and Python 3

To obtain Python 2.x and Python 3.x on the same machine, you need to follow the following steps.

Install Python 2.x and Python 3.x with the default windows installers.
Go to the default installation path (C:Python3x) and rename python.exe to python3.exe.
Edit your environment variables to include the following directory link
C:Python27;C:Python27Scripts;C:Python34;C:Python34Scripts
The above is based on installing Python 2.7 and Python 3.4. Edit the versions based on your requirements.

Note that there can be a conflict when you change your environment variables because the two versions have the same name: python.exe.

Therefore, if you run through this error, ensure that you have followed step 2 carefully and renamed your python.exe file to python3.exe. So when the user runs python, version 2.x will get executed. With python3, the 3.x version will get executed, giving you access to both Python 2 and Python 3 on the same device.
Comment

PREVIOUS NEXT
Code Example
Python :: python 3.8 release date 
Python :: master python 
Python :: bayesian model probability 
Python :: Example 1: Reset Index & Drop Old Index pandas 
Python :: docker hub python 
Python :: dot product of two vectors python 
Python :: pass in python 
Python :: python while loop 
Python :: turn list into string 
Python :: python iterrows 
Python :: python add 
Python :: pack() tkinter 
Python :: get element by index in list python 
Python :: print column name and index 
Python :: What Is Python Recursive Function in python 
Python :: web3.py failing not installing 
Python :: replace NaN value in pandas data frame with zeros 
Python :: punto1 
Python :: supercharged python 
Python :: python. printing varibles 
Python :: kill os system by pid python script 
Python :: run persistent py script in background (good for flask) 
Python :: ytdl python check video length 
Python :: flask example 
Python :: decompress_pickle 
Python :: limiting user input to under 100 characters python 
Python :: numpy online practice 
Python :: how to add numbers in a list python 
Python :: pade python 
Python :: connect two mathod to the same button in pyq5 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =