我尝试运行以下boto library示例:
$echo $PYTHONPATH
/Library/Python/2.7/site-packages/
$python
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
>>> from boto.ec2.autoscale import AutoScaleConnection
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named boto.ec2.autoscale
$ls $PYTHONPATH | grep -i boto
boto3
boto3-1.3.0.dist-info
botocore
botocore-1.4.6.dist-info
在这个有用的PYTHONPATH问题之后,我不明白为什么找不到该模块。