zoukankan      html  css  js  c++  java
  • python版本管理--pyenv

    python版本环境管理

    下载依赖

    yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
    

    安装pyenv包

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

    设置环境变量

    vi ~/.bashrc
    添加环境变量:
    export PYENV_ROOT="$HOME/.pyenv" 
    export PATH="$PYENV_ROOT/bin:$PATH" 
    eval "$(pyenv init -)"
    重启环境变量   #source ~/.bashrc
    

    pyenv工具使用

    在Linux环境下已经有了pyenv,查看是否安装成功
    '''
    [root@izm5egnkapo0o29h3bgxa1z ~]# pyenv
    pyenv 1.2.8
    Usage: pyenv []

    Some useful pyenv commands are:
    commands List all available pyenv commands
    local Set or show the local application-specific Python version
    global Set or show the global Python version
    shell Set or show the shell-specific Python version
    install Install a Python version using python-build
    uninstall Uninstall a specific Python version
    rehash Rehash pyenv shims (run this after installing executables)
    version Show the current Python version and its origin
    versions List all Python versions available to pyenv
    which Display the full path to an executable
    whence List all Python versions that contain the given executable

    See `pyenv help ' for information on a specific command.
    For full documentation, see: https://github.com/pyenv/pyenv#readme
    '''

  • 相关阅读:
    Codeforces610b
    Codeforces597A
    Timus1014(贪心算法)
    一般贪心
    优先队列问题(此题来源哈尔滨理工大学VJ)
    POJ2551Dungeon Master
    LightOJ 1140: How Many Zeroes? (数位DP)
    HDU 2089:不要62(数位DP)
    HDU 4722:Good Numbers(数位DP)
    HDU 3709: Balanced Number (数位DP)
  • 原文地址:https://www.cnblogs.com/Edwardzhao/p/9980426.html
Copyright © 2011-2022 走看看