Official website: https://www.python.org/
Features:
- Python advocates beauty, clarity, and simplicity, and is an excellent and widely used language.
- Python is very simple and very suitable for human reading. Easy to learn: few keywords, simple structure, clear grammar.
- It is portable, supports object-oriented, rich libraries and frameworks.
- Interpretability and byte compiling.
Install Python3 in
Linux // Python2 version is already installed by default in Linux, no need to uninstall, just install Python3 directly
yum -y install python3
yum -y groupinstall Development Tools
//Enter the Python3 version
[root@python ~]# python3
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit(); //退出
Change domestic pip source
[root@python ~]# mkdir ~/.pip
[root@python ~]# vim ~/.pip/pip.conf
[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
Create a virtual environment and install ipython
[root@python ~]# mkdir /opt/py3
[root@python ~]# python3 -m venv /opt/py3/
//Enter the virtual environment
[root@python ~]# source /opt/py3/bin/activate
//Install ipython
(py3) [root@python ~]# pip install ipython
//Exit the virtual state
deactivate