Skip to content

Instantly share code, notes, and snippets.

@ThinkZ
Last active March 27, 2017 03:41
Show Gist options
  • Save ThinkZ/92be4719e320ca8c6c00d4fdf3515c60 to your computer and use it in GitHub Desktop.
Save ThinkZ/92be4719e320ca8c6c00d4fdf3515c60 to your computer and use it in GitHub Desktop.
Python 2 & 3 @ ubuntu
python 2.7.12
python 3.5.2
# 安装 Python 发布版本,dev包必须安装,很多用pip安装包都需要编译
sudo apt-get install python2.7 python2.7-dev python3.5 python3.5-dev
# 很多pip安装的包都需要libssl和libevent编译环境
sudo apt-get install build-essential libssl-dev libevent-dev libjpeg-dev libxml2-dev libxslt-dev
# install mysql & nginx
sudo apt-get install mysql-server nginx-extras
# mysql 5.7 default password amd12345
# 安装 pip & virtualenv
sudo apt-get install python-pip
sudo pip install virtualenv
#pip mirror
# windowns USERPROFILE\pip\pip.ini
# linux ~/.pip/pip.conf
#find-links =
# https://pypi.douban.com/simple
# https://pypi.mirrors.ustc.edu.cn/simple
# https://pypi.tuna.tsinghua.edu.cn/simple
# https://pypi.zenlogic.net/simple/
[global]
index-url = https://pypi.douban.com/simple
#[install]
#use-mirrors = true
#index-url = https://pypi.mirrors.ustc.edu.cn/simple
[list]
format=columns
======================================
# 安装 python2.7 virtualenv
virtualenv --no-site-packages -p /usr/bin/python2.7 ~/.venv/python2.7
# 安装 python3.2 virtualenv
virtualenv --no-site-packages -p /usr/bin/python3.2 ~/.venv/python3.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment