[Linux] Ubuntu Server18 python3.7 虚拟环境

Ubuntu Server18 python3.7 环境

Ubuntu Server18 默认是python3.6, 目前开发主要用python3.7.
所以想搭建python3.7环境. 试过几手动编译python3.7源码虽成功, 有时确实很麻烦(特别是遇到ssl错误, pip无法安装包).

最后总结一简易方式:

  1. 安装python3.7 : sudo apt-get install python3.7
  2. 安装pipenv : pip3 install pipenv

构建python3.7虚拟环境

  1. pipenv --python 3.7
  2. pipenv shell //激活虚拟环境
  3. pipenv update --python3.7

猜你喜欢

转载自www.cnblogs.com/abeen/p/11324235.html