1.执行python脚本报错:
报错:No module named google.protobuf
2.于是用pip安装protobuf
#命令:失败
LisaMacBook:sudo pip install protobuf
LisaMacBook:The directory '/Users/???/Library/Caches/pip/http'
or its parent directory is not owned by the current user
and the cache has been disabled. Please check the permissions
and owner of that directory. If executing pip with sudo,
you may want sudo's -H flag
#根据提示加上-H
#命令:失败
LisaMacBook:sudo -H pip install protobuf
LisaMacBook:Could not fetch URL https://pypi.python.org/simple/pip/:
There was a problem confirming the ssl certificate:
[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)
- skipping
#百度解决方法
LisaMacBook:wget https://bootstrap.pypa.io/get-pip.py
#或者 curl https://bootstrap.pypa.io/get-pip.py -o ./get-pip.py
#命令:失败
LisaMacBook:python get-pip.py
LisaMacBook:Could not install packages due to an EnvironmentError:
[Errno 13] P