CentOS6.9 Python环境配置(python2.7、pip、virtualenv)
程序员文章站
2023-11-27 12:10:04
python2.7
yum install -y zlib zlib-devel openssl openssl-devel mysql-devel gcc gc...
python2.7
yum install -y zlib zlib-devel openssl openssl-devel mysql-devel gcc gcc-c++ wget https://www.python.org/ftp/python/2.7.13/python-2.7.13.tgz tar -zxvf python-2.7.13.tgz cd python-2.7.13 ./configure --prefix=/usr/local/python2.7 make make install
setuptools
wget https://files.pythonhosted.org/packages/dc/8c/7c9869454bdc53e72fb87ace63eac39336879eef6f2bf96e946edbf03e90/setuptools-33.1.1.zip unzip setuptools-33.1.1.zip cd setuptools-33.1.1 /usr/local/python2.7/bin/python2.7 setup.py install
pip
wget https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz --no-check-certificate tar -zxvf pip-1.3.1.tar.gz cd pip-1.3.1 /usr/local/python2.7/bin/python2.7 setup.py install
建立软链接
cd /usr/bin ln -s /usr/local/python2.7/bin/pip-2.7 ./pip2.7 ln -s /usr/local/python2.7/bin/python2.7 ./python2.7
virtualenv
pip2.7 install virtualenv cd /usr/bin ln -s /usr/local/python2.7/bin/virtualenv ./
virtualenvwrapper
pip2.7 install virtualenvwrapper mkdir ~/.virtualenvs vi /etc/profile export workon_home=~/.virtualenvs export virtualenvwrapper_python=/usr/bin/python2.7 source /usr/local/python2.7/bin/virtualenvwrapper.sh source /etc/profile
总结
以上所述是小编给大家介绍的centos6.9 python环境配置(python2.7、pip、virtualenv),希望对大家有所帮助
推荐阅读
-
CentOS6.9 Python环境配置(python2.7、pip、virtualenv)
-
Win10下python3.5和python2.7环境变量配置教程
-
MacOS配置Anaconda3(Miniconda3)下Python3.6、Python3.7和Python2.7环境和基础机器学习、神经网络相关包详解(版本号对应)
-
CentOS6.9 Python环境配置(python2.7、pip、virtualenv)
-
CentOS6.9 Python环境配置(python2.7、pip、virtualenv)
-
Python爬虫学习==>第一章:Python3+Pip环境配置
-
Ubuntu中配置Python虚拟环境Virtualenv
-
python3.6环境安装+pip环境配置教程图文详解
-
Python虚拟环境的安装和配置-virtualenv与windows下多个python版本共存
-
Win10下python3.5和python2.7环境变量配置教程