Home  >  Article  >  Backend Development  >  Detailed explanation of installation of Python2.7 development environment under Linux RedHat (picture)

Detailed explanation of installation of Python2.7 development environment under Linux RedHat (picture)

黄舟
黄舟Original
2017-05-21 13:58:352134browse

This article mainly introduces in detail LinuxInstallation under RedHatPython2.7, pip, ipython environment, eclipse and The PyDev environment has certain reference value. Interested friends can refer to

Installing Python2.7, pip, ipython environment, eclipse and PyDev environment under Linux RedHat

Preparation , source Python2.6 backup:

Depending on which python specific directory, backup

mv /usr/local/bin/python cd /usr/ local/bin/python2.6

ormv /usr/bin/python /usr/bin/python2.6

Modify to use python2.6 Program configuration, such as yum

vim /usr/bin/yum
#!/usr/bin/python2.6

Check if yum is normal yum list

##1. Install Python2.7

Official website download Source package: Python-2.7.13.tgz

Compilation:

./configure --prefix=/usr/local

Installation:

make && mak install

Create a soft connection:

cd /usr/local/bin

ln -sv python2.7 python

cp header file: \cp -a /usr/local/

include/python2.7/* /usr/local/include

Enter to view:

2. Install pip

Download pip-9.0.1.tar.gz

Install

python setup.py install

3. Install ipython

Download ipython-5.3.0.tar.gz

Installation

python setup.py install

Install py

sqliteFor ipython recording history: pip install pysqlite

##4. Install eclipse

eclipse depends on jdk, download jdk-8u121-linux-x64.tar.gz

tar -xf jdk -8u121-linux-x64.tar.gz -C /usr/local/

Configure java environment

Variables

: vim /etc/profileFinally Add:

JAVA_HOME="/usr/local/jdk1.8.0_121" 
PATH=${JAVA_HOME}/bin:$PATH 
CLASSPATH=.:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar 
export JAVA_HOME 
export PATH 
export CLASSPATH

tar -xf eclipse-java-neon-3-linux-gtk-x86_64.tar.gz


eclipse installation pydev plugin:

help-install

new software##add-name: Pydev -location: http:// pydev.org/up

date

Select only PyDev for

eclipse develop, then continue to the next step until the installation is complete and restart.

Configure python: Here is a screenshot of windows, just select the corresponding path on Linux.

Create PyDev module

, try it, write HelloWorld

At this point, the installation is complete , if an error is reported during the installation, it will prompt that some development libraries are missing, just install it with yum.

The above is the detailed content of Detailed explanation of installation of Python2.7 development environment under Linux RedHat (picture). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn