python基础安装配置


Python下载

编码中文支持

  • Python 声明编码格式 # -- coding: utf-8 -- 用来支持中文

Python虚拟化

pyenv

安装pyenv

brew install pyenv

国内加速安装python环境

v=3.8.6;wget https://npm.taobao.org/mirrors/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/;pyenv install $v

macos bigsur安装

CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.8.6 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)

Python库

安装gmpy2

  • Windows
    wheel 安装

  • macOS

    brew install gmp
    brew install mpfr
    brew install libmpc
    pip install gmpy2

文章作者: Secgxx
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Secgxx !
  目录