安装git
yum -y install gcc make patch gdbm-devel openssl-devel sqlite-devel readline-devel zlib-devel bizp2-devel curl-devel expat-devel gettext-devel zlib-devel perl
yum install git -y
创建用户
useradd python
passwd python
用户python登录
安装pyenv
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
在用户目录 ~/.base_profile 添加
export PATH="/home/python/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
source ~/.bash_profile 生效配置
pyenv install 3.5.3 -v 安装python353
cache 目录安装 在 .pyenv 建立目录cache目录 放安装包
pyenv 虚拟环境
virtualenv
插件 在plugins/pyenv-virtualenv
pyenv virtualenv 3.5.3 megedu353
pip通用配置
mkdir ~/.pip
touch ~/.pip/pip.conf
[global]
index-url=https://mirrors.aliyun.com/pypi/simple/
trusted-host=mirrors.aliyun.com
pip install jupyter
jupyter notebook help
启动jupyter
jupyter notebook --ip=0.0.0.0
网友评论