用户工具

站点工具


linux:pyenv

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
linux:pyenv [2016/10/24 15:06] – 创建 memorylinux:pyenv [2023/12/03 10:24] (当前版本) – 外部编辑 127.0.0.1
行 6: 行 6:
  
 ===== Installation ===== ===== Installation =====
- 
  
   git clone https://github.com/yyuu/pyenv.git ~/.pyenv   git clone https://github.com/yyuu/pyenv.git ~/.pyenv
行 15: 行 14:
 ===== Usage ===== ===== Usage =====
  
-Install Python 2.7: 
  
-  pyenv install 2.7.12+Install requirement: [(https://github.com/pyenv/pyenv/wiki/Common-build-problems)] 
 + 
 +  yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel 
 + 
 +Install Python 3.6.2
 + 
 +  pyenv install 3.6.2
  
 Use pyenv's python on specify directory: Use pyenv's python on specify directory:
  
-  cd /path/to/project && pyenv init +  cd /path/to/project 
-  python --version   # 2.7.12+  pyenv local 3.6.2 
 +  python --version   # 3.6.2 
 + 
 +===== Accelerate in China ===== 
 + 
 +<code bash> 
 +export VERSION="3.6.2" 
 +mkdir -p ~/.pyenv/cache/ 
 +wget https://npm.taobao.org/mirrors/python/$VERSION/Python-$VERSION.tar.xz -P ~/.pyenv/cache/ 
 +pyenv install $VERSION 
 +</code>
linux/pyenv.1477292773.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)