Upgrade Python and install Anaconda

Source: Internet
Author: User

Today a colleague asked me to upgrade Python for a server and install anaconda650) this.width=650; "height=" src= "Http://static.oschina.net/uploads/space /2016/0824/104409_ipny_2893628.png "width=" 329 "style=" Border:none;margin:auto;height:auto; "/>

Well, Python, I can pretend, but Anaconda never heard of it? This is what, then I asked the director how to install, he actually said he did not know how to install! Your mom, hey, you're not from the start of the company! You don't know how to dress these things!

No way, can only study on their own. Anyway, find the installer first.

Anaconda 2.4.1 Download Connection: http://repo.continuum.io/archive/Anaconda3-2.4.1-Linux-x86_64.sh
python3.5.1 https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz

The original version of Python is 2.7.1 need to upgrade, in order to upgrade after the problem can be restored, here is a soft connection to install.

The installation process does not say, after installation, set up a soft connection.

Mv/usr/bin/python/usr/bin/python.bak to rename the original Python boot file

Ln-s/usr/local/python/bin/python3/usr/bin/python establishing a soft connection

You should be able to see the new version number.

650) this.width=650; "height=" "src=" Http://static.oschina.net/uploads/space/2016/0824/110544_qAWn_2893628.png " Width= "585" style= "Border:none;margin:auto;height:auto;"/>

However, Yum will have problems in this way, so you need to change the Yum file

Vi/usr/bin/yum Change the #!/usr/bin/python of the file header to #!/usr/bin/python.bak (note that this is the previous version of the Python number, since the old version can support Yum)

After installing Python, start installing anaconda

Run the script file directly sh anaconda3-2.4.1-linux-x86_64.sh and press any key will pop up a protocol, enter Yes

2. Change the path (the default path is/root/anaconda) and press ENTER to change the new path

3. Write the path to BASHRC [Yes|no]

Select Yes to wait for installation

Then modify the environment variables, because Python will still use the 2.7 version after the restart, so also by the way the python changed

Vi/root/.bash_profile

At the end of the add these 2 paths

Export path= $PATH: path to/usr/local/python3/bin python3.5.1
Export path= path to "/root/anaconda3/bin: $PATH" Anaconda

Restart the server after saving is successful


Upgrade Python and install Anaconda

Related Article

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.