20
2018
12

树莓派安装pyenv

在树莓派上安装其实就是在Debian上安装,和ubuntu的步骤差不多,主要注意先要安装前置的几个包,防止后面下不下来python。

安装依赖包(从网上找到的,可能有冗余的,一起安了)


这是新的
sudo apt install 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 liblzma-dev python-openssl git

sudo apt-get update
sudo apt-get install make build-essential libssl-dev zlib1g-dev
sudo apt-get install libbz2-dev libreadline-dev libsqlite3-dev wget curl
sudo apt-get install llvm libncurses5-dev libncursesw5-dev

安装pyenv

我使用一键官方脚本安装,会自动安好pyenv与pyenv-virtualenv
github:https://github.com/pyenv/pyenv#installation

install:
$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

Update:
$ pyenv update

Uninstall: pyenv is installed within $PYENV_ROOT (default: ~/.pyenv). To uninstall, just remove it:
$ rm -fr ~/.pyenv
and remove these three lines from .bashrc:
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

pyenv用法

请参考我的另一篇文章,请点击文章名跳转:使用pyenv与pyenv-virtualenv管理python环境

« 上一篇 下一篇 »