python Download
Python's latest source code, binary documents, news, etc. can be found on the Python website:
Python official website: http://www.python.org/
You can download the Python document in the link, and you can download the documents in HTML, PDF and PostScript format.
Python document download Address: www.python.org/doc/
Python installation
Python has been ported on many platforms (modified to make it work on different platforms).
You will need to download the binary code that is appropriate for your use of the platform, and then install Python.
If the binary code of your platform is not available, you need to compile the source code manually using the C compiler.
The compiled source code, with more selectivity in functionality, provides more flexibility for Python installation.
Here's how to install Python on different platforms:
Unix & Linux Platform Installation Python:
Here are the simple steps to install Python on UNIX & Linux platforms:
Open a Web browser to access http://www.python.org/download/
Select the source compression package for unix/linux.
Download and unzip the zip package.
If you need to customize some options to modify Modules/setup
- Execute the./configure script
- Make
- Make install
After doing this, Python installs in the/usr/local/bin directory, and the Python library is installed in/USR/LOCAL/LIB/PYTHONXX,XX for the version number of the python you are using.
Window Platform installation python:
The following are the simple steps to install Python on the window platform:
Open Web browser access http://www.python.org/ download/
Select the window platform installation package in the download list, in the package format: Python-xyz.msi file, XYZ is the version number you want to install.
To use Setup Python-xyz.msi, Windows systems must support the use of Microsoft Installer 2.0. Just save the installation file to your local computer, and then run it to see if your machine supports MSI. Windows XP and later versions already have MSI, and many older machines can also install MSI.
after downloading, double-click the download package, go to the Python Installation Wizard, installation is very simple, you just need to use the default settings always click "Next" until the installation is complete.
Mac platform Installation python:
The most recent Mac OS system comes with a python environment, but the Python version comes with an older version, which you can link http://www.python.org/download/mac/ Check out the new features of Python on your Mac.
Full Python installation tutorial on Mac You can view: http://homepages.cwi.nl/~jack/macpython/index.html
Environment variable Configuration
Programs and executables can be in many directories, and these paths are probably not in the search path where the operating system provides executable files.
The path is stored in an environment variable, which is a named string maintained by the operating system. These variables contain information about the available command-line interpreters and other programs.
Path variable in UNIX or Windows is path (Unix case-sensitive, Windows is case-insensitive).
In Mac OS, the setup process changes the Python installation path. If you need to reference Python in another directory, you must add a Python directory to the path.
Setting environment variables in Unix/linux
In CSH Shell: input
, press "Enter".
In bash Shell (Linux): input
, press "Enter".
In sh or ksh shell: input
Path= "$PATH:/usr/local/bin/python"
, press "Enter".
Note:/usr/local/bin/python is the installation directory for Python.
Setting environment variables in Windows
To add a Python directory to an environment variable:
In the Command Prompt box (cmd): Enter
, press "Enter".
Note: C:\Python is the installation directory for Python.