sudo python -mpip install -U matplotlib
I fixed it by installing python-dev:
sudo apt-get install python-dev
ref:
https://github.com/google/python-subprocess32/issues/38
每一个错误的经验积累,就是通向成功的阶梯。
Each mistake I made shall become one of the stairs towards success.
sudo apt-get install python3-pip
sudo pip3 install MODULE_NAME
env_mysite\scripts\activate
\scripts folder. You will notice your command prompt has now changed:(env_mysite) C:\Users\Nigel\OneDrive\Documents\mysite_project>
(env_mysite) at the beginning of the command prompt lets you know that you are running in the virtual environment. Our next step is to install Django.source bin/activate
# -*- coding: utf-8 -*-
from collections import defaultdict
members = [
# Age, name
['male', 'John'],
['male', 'Jack'],
['female', 'Lily'],
['male', 'Pony'],
['female', 'Lucy'],
]
result = defaultdict(list)
for sex, name in members:
result[sex].append(name)
print result
# Result:
defaultdict(<type 'list'>, {'male': ['John', 'Jack', 'Pony'], 'female': ['Lily', 'Lucy']})