python安装
基础开发库
apt-get install gcc apt-get install openssl libssl-dev
安装数据库和开发库
apt-get install mysql-server libmysqld-dev
python环境
下载地址: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
setuptools安装
要使用easy_install工具,那么需要安装setuptools,方式如下:
下载地址: https://pypi.python.org/pypi/setuptools 方式如下: unzip setuptools-28.8.0.zip cd setuptools-28.8.0/ /opt/python2.7/bin/python ./setup.py install
pip安装
/opt/python2.7/bin/pip install -r ./requirements.txt
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/120416.html