Python is an easy to learn, powerful programming language.
安装Python3.6
Ubuntu 14.04 and 16.04
添加add-apt-repository
命令
1 | sudo apt-get install software-properties-common |
通过PPA安装
1 | sudo add-apt-repository ppa:jonathonf/python-3.6 |
安装python-dev
用于避免安装包时出缺少 Python.h 而安装失败
1 | sudo apt-get install python3.6-dev |
安装pip
1 | wget https://bootstrap.pypa.io/get-pip.py |
安装pipenv
这个库相当于是环境管理和包管理二合一,由 Kenneth Reitz (Requests 的作者 )编写,现在移交给 Python 官方来维护,提供比 pip 体验更好的开发包管理。它的 Slogon 是Python Development Workflow for Humans,用来解决各种环境不一致、安装包的问题,可参见官方文档
1 | pip3.6 install pipenv |
构建pipenv环境
生成Pipfile, 添加阿里源
1 | cd your-project |
[[source]]
url = “https://pypi.org/simple"
url = “https://mirrors.aliyun.com/pypi/simple/"
verify_ssl = true
name = “pypi”[packages]
[dev-packages]
[requires]
python_version = “3.6”
1 | pipenv install ipython |