Install pyenv in ubuntu 16.04

2018-07-16  本文已影响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
上一篇下一篇

猜你喜欢

热点阅读