Bo main QQ:819594300
Blog address:http://zpf666.blog.51cto.com/
Have any questions friends can contact Bo Master, Bo Master will help you answer, thank you for your support !
CentOS7 installing Python3 and virtualenv via Pyenv
CentOS The version of Python that is installed by default is version 2.7.5. We will step through the installation of Python3.6.1 on the CentOS server.
Since many of the tools in the CentOS system are dependent on the Python2.7.5 of the system, it is necessary to use PYENV for environmental isolation in order not to affect the use of Python2.7.5. Virtualenv is used to create a separate Python environment for each Python app.
The following begins the formal installation:
1 ) Update System
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/94/C3/wKiom1kNefPweXtXAABf5E0p2zM803.jpg "style=" float : none; "title=" image001.jpg "alt=" Wkiom1knefpwextxaabf5e0p2zm803.jpg "/>
2 ) Installation dependent environment
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/94/C2/wKioL1kNefOho5NWAACJlNesJkc886.jpg "style=" float : none; "title=" image002.jpg "alt=" Wkiol1knefoho5nwaacjlnesjkc886.jpg "/>
3 ) Install pyenv
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/94/C2/wKioL1kNefPh8O4pAAB_7NMSwtM300.jpg "style=" float : none; "title=" image003.jpg "alt=" Wkiol1knefph8o4paab_7nmswtm300.jpg "/>
4 ) Configure environment Variables
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/94/C3/wKiom1kNefTzet9eAAD8JW7tSSg406.jpg "style=" float : none; "title=" image004.jpg "alt=" Wkiom1kneftzet9eaad8jw7tssg406.jpg "/>
5 The following results have been successfully installed
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/94/C3/wKiom1kNefTi6_RjAADhXgTWzsQ340.jpg "style=" float : none; "title=" image005.jpg "alt=" Wkiom1knefti6_rjaadhxgtwzsq340.jpg "/>
6 ) Install Python3
Description: You can use pyenv install-l to view supported versions of the installation
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/94/C2/wKioL1kNefWSzdUhAABcad4lnsU473.jpg "style=" float : none; "title=" image006.jpg "alt=" Wkiol1knefwszduhaabcad4lnsu473.jpg "/>
Installing 3.6.1
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M02/94/C2/wKioL1kNefWSwLuyAACEEkq3GvA213.jpg "style=" float : none; "title=" image007.jpg "alt=" Wkiol1knefwswluyaaceekq3gva213.jpg "/>
7 ) version switching
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/94/C3/wKiom1kNefWRfuJnAADeF9BkBwo803.jpg "style=" float : none; "title=" image008.jpg "alt=" Wkiom1knefwrfujnaadef9bkbwo803.jpg "/>
8 ) View Python version
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/94/C2/wKioL1kNefWyoTeSAAC6wKjWB-Q552.jpg "style=" float : none; "title=" image009.jpg "alt=" Wkiol1knefwyotesaac6wkjwb-q552.jpg "/>
9 ) Install virtualenv
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/94/C3/wKiom1kNefaB6oS9AABq_0btf0I077.jpg "style=" float : none; "title=" image010.jpg "alt=" Wkiom1knefab6os9aabq_0btf0i077.jpg "/>
Ten ) Create a virtual environment
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/94/C2/wKioL1kNefbBPFEFAABdAaCGtis073.jpg "style=" float : none; "title=" image011.jpg "alt=" Wkiol1knefbbpfefaabdaacgtis073.jpg "/>
One ) to start the virtual environment
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/94/C3/wKiom1kNeffic7ikAAEr3gDVfHM521.jpg "style=" float : none; "title=" image012.jpg "alt=" Wkiom1kneffic7ikaaer3gdvfhm521.jpg "/>
A ) exit the virtual environment
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/94/C2/wKioL1kNefejYSmRAACMyOh6LlM955.jpg "style=" float : none; "title=" image013.jpg "alt=" Wkiol1knefejysmraacmyoh6llm955.jpg "/>
If you want multiple versions, install a few more versions. Then you can switch back and forth.
For example you do: pyenv install 2.7.13 installation 2.7. After the 13 version is complete, you can switch back and forth, as I have shown below:
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/94/C3/wKiom1kNefjzee-0AAG86BAUhKw808.jpg "style=" float : none; "title=" image014.jpg "alt=" Wkiom1knefjzee-0aag86bauhkw808.jpg "/>
This article is from the IT Technical Assistant blog, so be sure to keep this source http://zpf666.blog.51cto.com/11248677/1922675
Python series (vi) deploying multiple Python versions in centos7.x