The following is a basic environment installation of Python in Ubuntu
One, Python installation
1. Basic Development Library
sudo apt-get install gcc
sudo apt-get install OpenSSL Libssl-dev
2. Install the database and the development library
sudo apt-get install mysql-server Libmysqld-dev
3. Python Environment
: https://www.python.org/downloads/
TAR-XVF PYTHON-2.7.10.TAR.XZ
CD python-2.7.10/
./configure--prefix=/opt/python2.7
Make
Make install
echo "Export path=/opt/python2.7/bin:\ $PATH" >/etc/profile.d/python.sh
Echo $PATH
which Python
mkdir ~/.python-eggs
chmod +w ~/.python-eggs
echo "Export path=/opt/python2.7/bin:\ $PATH" >/etc/profile.d/python.sh
Export Path=/opt/python2.7/bin: $PATH
Second, Setuptools installation
To use the Easy_install tool, you need to install setuptools in the following manner:
sudo apt-get install Python-setuptools
Or
:
Https://pypi.python.org/pypi/setuptools
Here's how:
Unzip Setuptools-39.2.0.zip
CD setuptools-39.2.0/
/opt/python2.7/bin/python./setup.py Install
Four, PIP installation
sudo apt-get install Python-pip
Or
/opt/python2.7/bin/pip Install-r./requirements.txt
"Automated combat" hands-on installation from Python to Setuptools, pip tool installation