centos 下面安装python2.7 +pip +mysqld
程序员文章站
2023-03-29 21:40:36
python2.7
复制代码 代码如下:
wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.tar.xz...
python2.7
复制代码 代码如下:
wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.tar.xz
yum install xz-libs
xz -d python-2.7.6.tar.xz
ls
tar -xvf python-2.7.6.tar
cd python-2.7.6
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline
ldflags="-wl,-rpath /usr/local/lib"
vim /etc/ld.so.conf
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared ldflags="-wl,-rpath /usr/local/lib"
make clean
make && make altinstall
pip
复制代码 代码如下:
wget --no-check-certificate
tar -vxf setuptools-1.4.2.tar.gz
cd setuptools-1.4.2
python2.7 setup.py install
easy_install-2.7 pip
mysqldb
复制代码 代码如下:
yum -y install mysql-python
yum -y install mysql-devel
easy_install-2.7 mysql-python
推荐阅读
-
CentOS下编译安装python包管理安装工具pip教程
-
Centos7安装python3和pip3(一)
-
CentOS6.9 Python环境配置(python2.7、pip、virtualenv)
-
centos 下面安装python2.7 +pip +mysqld
-
Centos 6.4 安装Python 2.7 python-pip的详细步骤
-
centos6.7 安装python2.7、pip2.7、easy_install-2.7的方法
-
Centos8(最小化安装)全新安装Python3.8+pip的方法教程
-
python2.7 安装pip的方法步骤(管用)
-
centos6.5安装python3.7.1之后无法使用pip的解决方案
-
centos下pip安装