美文网首页
Install pyenv in ubuntu 16.04

Install pyenv in ubuntu 16.04

作者: 璟的简书 | 来源:发表于2018-07-16 21:22 被阅读0次

Install pyenv in ubuntu 16.04

1. Install pyenv

First, you need install dependent libraries listed below:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev

or you have installed many libraries, just run command below:

sudo apt-get install zlibc zlib1g-dev

PS: error fix:https://askubuntu.com/questions/993609/error-installing-zlib1g-dev

2. Install python "--enable-shared"

PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.0

3. rename the virtual environment

  1. install pyenv vritual environment plugin
git clone https://github.com/pyenv/pyenv-virtualenv.git /home/your_path/.pyenv/plugins/pyenv-virtualenv
  1. rename
pyenv virtualenv 3.6.0 py360

4. Install the packages

  1. first activate the virtual env
pyenv activate py360
  1. install other libraries from mirror website TUNA
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy scipy sklearn tensorflow-gpu torch SimpleITK h5py itk vtk matplotlib

相关文章

网友评论

      本文标题:Install pyenv in ubuntu 16.04

      本文链接:https://www.haomeiwen.com/subject/wzvbpftx.html