zoukankan      html  css  js  c++  java
  • pyenv 安装

    linux上进行安装

    1.环境准备:

    yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel

    2.Check out pyenv where you want it installed. A good place to choose is $HOME/.pyenv (but you can install it somewhere else)

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

    3.Define environment variable PYENV_ROOT to point to the path where pyenv repo is cloned and add $PYENV_ROOT/bin to your $PATH for access to the pyenv command-line utility.

    For bash:

    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile

    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile

    4.Add pyenv init to your shell to enable shims and autocompletion. Please make sure eval "$(pyenv init -)" is placed toward the end of the shell configuration file since it manipulates PATH during the initialization.

    echo -e 'if command -v pyenv 1>/dev/null 2>&1; then
      eval "$(pyenv init -)"
    fi' >> ~/.bash_profile

    5.Restart your shell so the path changes take effect. You can now begin using pyenv

    exec "$SHELL"

    6.安装

    pyenv install --list

    安装 

    pyenv install 3.8.6

    查看当前python版本

    pyenv version

    查看安装了多少个python版本

    pyenv versions

    pyenv virtualenv 3.8.6 sandbox27

    pyenv activate <name>

    pyenv deactivate

  • 相关阅读:
    1 从瀑布到敏捷——漫画解读软件开发模式变迁史(转载)
    xshell 常用命令1
    Python---3基础输入方法
    React 初试
    Js 入门文档
    SpringCloud 入门知识篇
    SpringBoot mysql, redis 配置
    工作常用命令
    Java 内置锁 重入问题
    牛顿迭代法, 开根号
  • 原文地址:https://www.cnblogs.com/L-O-N/p/13736603.html
Copyright © 2011-2022 走看看