Centos7.X安装pyenv

yum install libffi-devel -y # 编译python前安装
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y

git clone https://github.com/pyenv/pyenv.git ~/.pyenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n \
eval "$(pyenv init -)"\nfi' >> ~/.bashrc
exec bash

mkdir -p ~/.pyenv/cache
wget -t 3 -T 3 -O ~/.pyenv/cache/Python-3.7.5.tar.xz \
https://npm.taobao.org/mirrors/python/3.7.5/Python-3.7.5.tar.xz

~/.pyenv/bin/pyenv install -v -f 3.7.5
~/.pyenv/bin/pyenv global 3.7.5
exec bash
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install --upgrade pip
pip install requests mysqlpy paramiko ipython numpy scipy opencv-python open3d sanic sanic_cors
上一篇:普通Java程序员学习使用的6个JDK内建工具


下一篇:Python - pyenv