云服务器Linux系统 centos7.x下 python环境安装

CentOS7.2更改yum源与更新系统:https://blog.csdn.net/weixin_35934768/article/details/52637273

centos7.5下 python环境安装

yum -y update
yum -y install zlib* unzip p7zip git zsh htop supervisor libssl* readline* pcre* sqlite* ncurses* llvm openssl* wget python-devel python-zope-interface libbz2* tk tk-devel tmux
yum group install "Development Tools"
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
tar xvf Python-3.7.2.tgz
cd Python-3.7.2
./configure --enable-optimizations
make -j8
make install

报错中有 if not _ctypes ->

wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libffi-devel-3.0.13-18.el7.x86_64.rpm
rpm -ivh libffi-devel-3.0.13-18.el7.x86_64.rpm

如果因为服务器报错 error: Failed dependencies:

rpm -ivh --nodeps libffi-devel-3.0.13-18.el7.x86_64.rpm

继续

make -j8
make install

如果make 不了 调回python 目录 重新make一次

If pip3 not found ->

curl https://bootstrap.pypa.io/get-pip.py | python3
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
pip3 install --upgrade pip
pip3 install --upgrade anyconfig asn1crypto cffi click cryptography daemonize flask flask-cors gevent greenlet idna itsdangerous jinja2 jsmin markupsafe olefile optionaldict peewee pillow pycparser pymysql python-dateutil pyyaml qrcode redis hiredis ujson requests setuptools six tornado wechatpy werkzeug xmltodict pydash mycli oss2 arrow schema xlrd cos-python-sdk-v5 xmltodict ipython pip pytest pylint yapf glances incremental pymysql
yum install git -y
git clone https://github.com/luvvien/pymysqlpool
pip3 install pymysqlpool/
wget https://twistedmatrix.com/Releases/Twisted/18.9/Twisted-18.9.0.tar.bz2
yum install bzip2 -y
tar xvf Twisted-18.9.0.tar.bz2
cd Twisted-18.9.0
python3 setup.py install

Nginx

wget https://nginx.org/download/nginx-1.15.10.tar.gz
tar xvf nginx-1.15.10.tar.gz
cd nginx-1.15.10
./configure --with-http_gzip_static_module --with-http_ssl_module --with-http_stub_status_module --with-http_v2_module --prefix=/usr/local/nginx && make && make install

Redis

cd /usr/src
wget http://download.redis.io/redis-stable.tar.gz
tar xvf redis-stable.tar.gz
cd redis-stable
make && make install
cd utils
chmod +x install_server.sh
./install_server.sh

(然后一路回车)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值