MacOS/CentOS安装Python3.7.0

因为想要用HttpRunner,在2.7.12下编译报错了,我估计是跟版本相关,就只能安装Python3了

MacOS

  • $ brew install pyenv


    MacOS/CentOS安装Python3.7.0_第1张图片
    image.png
  • (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    MacOS/CentOS安装Python3.7.0_第2张图片
    image.png

  • $ pyenv -v 检查是否安装成功


    image.png
  • $ pyenv install --list 找到可以安装的python版本,我选择3.7.0

  • $ pyenv install 3.7.0

    image.png

MacOS/CentOS安装Python3.7.0_第3张图片
image.png
MacOS/CentOS安装Python3.7.0_第4张图片
image.png
  • $ pyenv local 3.7.0 切换python版本,将3.7.0设为本地默认版本

CentOS

  • 安装成功


    MacOS/CentOS安装Python3.7.0_第5张图片
    image.png
  • 验证版本


    MacOS/CentOS安装Python3.7.0_第6张图片
    image.png
MacOS/CentOS安装Python3.7.0_第7张图片
image.png
MacOS/CentOS安装Python3.7.0_第8张图片
image.png

https://www.jianshu.com/p/24541be278c7
https://www.cnblogs.com/simuhunluo/p/7704765.html
https://blog.csdn.net/qq_36416904/article/details/79316972
https://blog.csdn.net/foryouslgme/article/details/51683654

你可能感兴趣的:(MacOS/CentOS安装Python3.7.0)