Python installation
Windows:
1. Download the installation package HTTPS://WWW.PYTHON.ORG/DOWNLOADS/2, install the default installation path: C:\python273, configure the environment variable "right-click Computer"-"Properties"-"Advanced system Settings" --"Advanced"-"Environment variable"-"in the Second content box find a row of the variable named path, double-click the"-"Python installation directory appended to the variable value, use; split" such as: the original value; C:\python27, with a semicolon in front.
Linux:
Bring your own Python environment if your own python2.6 environment is updated to python2.7, it is recommended to use PYENV for Python version management
Update python
Windows:
Unloading load
Linux:
SOURCE mode:
View the default Python version python-v 1, install GCC, to compile the Python source yum install GCC2, download the source package, HTTPS://WWW.PYTHON.ORG/FTP/PYTHON/3, Unzip and enter the source file 4, compile and install ./configure make install5, view version /usr/local/bin/python2.7-v6, Modify the default Python version mv/usr/bin/python/usr/bin/python2.6 ln-s/usr/local/bin/python2.7/usr/bin/python7, Prevents Yum from performing exceptions and modifies the Python version Vi/usr/bin/yum used by Yum to modify the head #!/usr/bin/python to #!/usr/bin/python2.6
Pyenv Way:
1. Install the dependency pack yum install readline readline-devel readline-static OpenSSL openssl-devel openssl-static sqlite-devel Bzip2-devel bzip2-libs-y2, install pyenvgit clone git://github.com/yyuu/pyenv.git ~/.pyenvecho ' export PYENV_ROOT= ' $HOME/. Pyenv "' >> ~/.bashrcecho ' export path=" $PYENV _root/bin: $PATH "' >> ~/.bashrcecho ' eval" $ (pyenv init-) "' > > ~/.bashrcexec $SHELL-l3. Installing pythonpyenv install--listpyenv install 2.7.9-vpyenv Rehash4, modifying the default Python version mv/usr/bin/ Python/usr/bin/python.2.6ln-s ~/.pyenv/versions/2.7.9/bin/python/usr/bin/python5, modifying the Python version used by Yum vim/usr/bin/ Yum changes the head #!/usr/bin/python to #!/usr/bin/python2.6
Python learning "second" python Primer