环境:Ubuntu 14.04

0. apt-get update

安装pyenv

  1. apt-get -y install python-pip
  2. apt-get install curl
  3. apt-get install git
Requirements

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

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

5. 添加环境变量

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

4,5步可以使用另一种方法(二选一):

curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash

6. 重启shell,pyenv安装成功 exec "$SHELL"

7. 安装Python2.7.8 pyenv install 2.7.8

8. 创建虚拟环境 pyenv virtualenv 2.7.8 jupyter

9. 进入虚拟环境 pyenv activate jupyter

10. 安装jupyter notebook sudo pip install jupyter

11. 启动Python教程 jupyter notebook

12.  jupyter 使用教程:http://blog.csdn.net/tina_ttl/article/details/51031113

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐