Python learning "second" python Primer

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.