Python is a cross-platform, portable programming language that can be installed on Windows, Linux, and Mac OS X systems.

Once installed, you will be given the Python interpreter environment, and you can use the terminal to type Python commands to see if Python and the Python version are available locally. One thing to note here is that an error is reported if the Python installation directory is not added to the environment variable (Python is not an internal or external command, nor is it an executable). You need to add the Python installation environment to the environment variable.

Python download

Python official website: www.python.org/

Python documentation address: www.python.org/doc/

It is recommended that you download and learn Python version 3, although you can also download Python version 2. Will anyone be torn between Python 2 and Python 3?

Actually here does not need to tangle, official explanation here: wiki.python.org/moin/Python… What it basically means is that Python 3 is the present and future of the language, and Python 2 is bound to be the past.

Install Python on Windows

Go to the official website to download according to the package, the next step is basically ok.

Python communication learning QQ group: 947840047, and can not install partners, come to find me in the group!

Check this option during installation. Environment variables are added directly.

Once installed, you can verify it. On the CMD screen, type Python. If you can see the following interface, the installation and success.

Python communication learning QQ group: 947840047, and can not install partners, come to find me in the group!

Install Python in Linux

Most Linux distributions have Python installed by default, but Python 2 is installed by default. If you want to install Python version 3, you need to install it yourself.

You are advised to take a snapshot on the VM before installation

Go to the official website to find this download. www.python.org/downloads/s…

Next go to your Linux system and unzip the downloaded files

Dependencies that might be used by installing python3.6

yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-develyum -y install GCC * to python’s official website to find the download path, using wget download wget www.python.org/ftp/python/… Decompression TGZ package tar ZXVF Python – 3.6.4 radar echoes captured. The below TGZ move Python to/usr/local Python – 3.6.4 radar echoes captured mv/usr/local to delete the old version of Python rely on ll/usr/bin | grep pythonrm • Go to the python directory: CD /usr/local/python-3.6.4 /configure –prefix=/usr/local/python3.6 Make install to delete old soft links Create a new soft link to the latest PYTHonRM -rf /usr/bin/pythonln -s /usr/local/bin/python3.6 /usr/bin/pythonln -s / usr/local/bin/python3.6 / bin/pip3.6 / usr/bin/pip3python – V

Python communication learning QQ group: 947840047, and can not install partners, come to find me in the group!

Problems that might arise

Zipimport. ZipImportError: can ‘t decompress data because of lack of zlib related kit, know the problem, so we only need to install the relevant depend on the package

yum -y install zlib*

Install Python on a MAC

MAC systems typically ship with Python version 2.7. To install Python 3, go to the official website and download it. I won’t go into the details here.

Author: A clean current in the Python world