Python Learning pyenv Environment Building

Source: Internet
Author: User
Tags virtualenv

1.安装git,github地址为https://github.com/pyenv/pyenv-installer/ yum install git -y
2.安装python编译依赖环境 yum -y install gcc make patch gdbm-devel openssl-devel sqlite-devel     readline-devel zlib-devel bzip2-devel
4.安装pyenv环境 curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
5.在python用户的环境变量目录~/.bash_profile下添加环境变量 export PATH export PATH="/home/python/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"
  6.python View version command: Python--version pyenv command: pyenv install-l #列出所有能安装的包 pyenv help Local #         Specifies a local pyenv environment in which all subdirectories inherit their properties recursively #指定全局的环境 shell #指定当前会话 install #指定安装的版本 Uninstall #卸载指定的安装环境包 Rehash version #查看当前环境使用的pyenv版本 versions #查看所有的存在的pyenv版本 with * for the current PY Env environment version which whence  
7.virtualenv虚拟环境设置  [[email protected] python3.5.3]$ pyenv versions   system * 3.5.3 (set by /home/python/python3.5.3/.python-version)   3.6.2 [[email protected] python3.5.3]$ pyenv virtualenv 3.5.3 3-5-3 #将3.5.3版本的python命名为3-5-3的别名 Requirement already satisfied: setuptools in /home/python/.pyenv /versions/3.5.3/envs/3-5-3/lib/python3.5/site-packages Requirement already satisfied: pip in /home/python/.pyenv/versions/3.5.3/envs/3-5-3/lib/python3.5/site-packages [[email protected] python3.5.3]$ pyenv versions  system  3-5-3* 3.5.3 (set by /home/python/python3.5.3/.python-version)  3.5.3/envs/3-5-3  

Python Learning pyenv Environment Building

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.