Under Record How to install a specific version of python on a Linux system. (I did not think you Nongmeitaiyan also took out a forest). I am here roughly divided into two major steps:
1. obtain the installation package
1.1 raspberries come in with a browser, you can download directly from the official website. URL's official website is:
www.python.org
After entering the page, click on " Downloads " in this column, select "in the drop-down menu Source code ."
1.2 Select the version of the XZ Compressed Source tarball , that can be compiled archive version.
1.3 find their favorite python version in the next page. Here with Python 3.7.0 , for example, click on " the Download ." This is only a dozen MB, overall or quickly.
1.4 Raspberry Pi download something from the browser are automatically saved in the path / home / Downloads folder, which is shown below:
Of course you can also use the command line to enter this path:
cd ./Downloads
1.5 The archive bit mean tar.xz format, which is compressed inside the outer packaging. The need to deal with this archive command:
tar xvf Python-3.7.0.tar.xz
There is a new folder, unzip is finished python3.7.0 installation package in the current directory.
2. Compile the installation package
After getting the installation package, we show them, look at the entire command line operation.
2.1 First, open the installation package:
2.2 using the command "ls", the installation package found things quite a bit.
2.3 installation package has a configure, FIG press instruction execution.
2.4 Finally, the input instruction FIG directly translated, OK Liao.
Pull a little bit, when compiling files are installed should preferably let into the root command-line mode, or some authority to operate can not be executed. Command-line mode to enter the root is relatively simple, the input command "sudo su", the transport of the machine to enter a password.
2.4 step is not successful, as shown in the image on the first, to make the command line enter root mode, then enter " the make && the make install " command to compile.
3. Check the version
Open a new command window enter " python3 " python enter edit mode, where you can see the version number is 3.7.0, the installation was successful.
Python need to exit edit mode, you can enter "quit ()", after the carriage return will withdraw.
Installation pip
pip is used to install python support package, we need to click. Here to windows10 system as an example.
First enter the official website www.pypi.org, download files red circle.
After downloading extract it better.
Open the folder.
Hold down the shift key, right-click on the folder in the space, select " open powershell window here ", enter the following command:
python setup.py install
Executing the OK.