Linux configuration Python environment method

  

Linux needs to use Python, you need to configure its environment, because there are more steps involved, so Xiaobian will give you a detailed explanation, let's look at it together See how Linux configures the Python environment.

OS: Oracle Linux Enterprise 5.6

1. Download

Python

Version: Python-2.7.3.tgz

setuptools

Version: setuptools-0.6c11.tar.gz(md5)

You can also use wget to download:

wget http://pypi.python. Org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e

2. Install Python

--View the system's own python:

[root@njdyw ~]# python

python python2 python2.4

--Install Python2.7.3

[root@njdyw ~]# mkdir /python

[root@njdyw ~]# cp Python-2.7.3.tgz /python/

[root@njdyw ~]# cd /python/

[root@ Njdyw python]# ls

Python-2.7.3.tgz

--Unpacking

[root@njdyw python]# tar -zvxf Python-2.7.3.tgz

[root@njdyw python]# ls

Python-2.7.3 Python-2.7.3.tgz

--configure To avoid the impact of the original Python, you must develop prefix.

[root@njdyw python]# cd Python-2.7.3

[root@njdyw Python-2.7.3]# . /configure --prefix=/usr/local/python2.7.3

--make:

[root@njdyw Python-2.7.3]# make

-- Make install:

[root@njdyw Python-2.7.3]# make install
Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved