Installation of Python and IDE development environment under Linux Platform

Source: Internet
Author: User


Installation of Python and IDE development environment under Linux Platform1. Python installationPython has 2.X and 3.X two versions, because the 2.X version is more stable, more users, this article chooses to use the Python 2.X version. Installation steps:


(1) Download Python installation package: https://www.python.org/downloads/



(2) Unzip the installation package: Tar zxvf python-2.7.10.tgz



(3) Compile:./compile



(4) Installation: Make && make install



Description



So Python is installed, and when you enter Python on the command line, you find that the old version is still the default. View Python,which python and find Python in the/usr/local/bin/python directory.



Ls/usr/local/bin/python, the latest version of python2.7 that you installed is also in this directory. Use python2.7 on the command line to use the latest version of Python.



If you want to modify the default Python version to Python2.7, follow these steps to place the system's default python in/usr/bin/ python2.6 (This 2.6 is the default version of the system), so at this point you need to establish a soft connection to the current system default Python directory, let the system use the new Python version.





mv / usr / bin / python /usr/bin/python2.6 // Operate the system default version python
ln -s /usr/local/bin/python2.7 / usr / bin / python // Note that the first path is the newly installed python version path, and the second path is the system default path




2, Python commonly used integrated development environment Ide1:eclips +pydevide2:vim
Because eclipse is more convenient to use, this article chooses IDE1 as the integrated development environment for Python. Eclips Download Link: Http://www.eclipse.org/downloads/?osType=linuxPyDev Download Link: Http://sourceforge.net/projects/pydev/?source=typ_redirectJDK Download Link: http://download.oracle.com/otn-pub/java/jdk/ 8u60-b27/jdk-8u60-linux-i586.tar.gz? authparam=1440939404_4780851d1b7a486f4d5ffbba16872880
(1) Unzip the JDK and copy the JDK to the/usr/local/directory.
tar zxvf jdk-8u60-linux-i586.tar.gz 
mv jdk1.8.0_60/  /usr/local/

(2) Configuring the JDK environment in/etc/profile
#set java environment
JAVA_HOME="/usr/local/jdk1.8.0_60"
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME
Load configuration Environment: Source/etc/profile then under the extracted Eclips directory, run:./eclips
(3) Add Quick Launch icon for Eclips① Restart the machine to ensure that the JDK environment is available globally. ② Create file: Vim/usr/share/applications/eclipse.desktop③ fill in the content:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=/opt/eclipse/eclipse(Your eclipse path)
Icon=/opt/eclipse/icon.xpm(Your eclipse path)
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;Development;
④ Save to exit, you can see the icon for the application in application.


(4) Add pydev add plugin in eclipse


Unzip Pydev will generate two folders, respectively, feature and plugins, copy the contents of the two directories to feature and plugins in the Eclips installation directory.
cp -r ./features/*  /opt/eclipse/features
cp -r ./plugins/*   /opt/eclipse/plugins
At this point the Pydev plug-in is installed.
(5) Configuring the Python development environment in EclipseWindows->preferences->pydev->interpreters->python interpreter, such as. The python environment is then set through new.
Fill in the name of the interpreter and the directory where the Python interpreter resides.
After completion, will automatically pop up the following window, select OK.

You can also set Python's default development environment to Python by Windows->open Perspective->other.

Then you can develop a Python project in eclipse
3. Introduction to other Python features: Https://zh.wikipedia.org/zh/PythonPython Introductory book recommendation: Http://www.cnpythoner.com/pythonbook.html


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.



Installation of Python and IDE development environment under Linux Platform


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.