Ubuntu18.04安装一些较麻烦的Python第三方库
由于工作中会比较常用以下的第三方库,直接pip安装会报错,现总结一下(网上的教程鱼龙混杂),亲测ok
安装aio_pika
比较麻烦,ubuntu16.04默认安装的是python3.5.2
如果直接sudo pip install aio_pika会报错
AttributeError: module ‘typing’ has no attribute ‘Coroutine’
如果在python3.6安装就不会出问题,看来是python3.5的typing库里缺少Coroutine
“The documentation you refer to is for version 3.5.3. RajSubit seemed to have verified that everything works as expected for 3.5.3. If you check the documentation for 3.5.2 you’ll see that Coroutine is not mentioned there. Hence the version of your Python distribution and the documentation you referred to just don’t match.”
这个链接说明问题
https://stackoverflow.com/questions/44651115/python-typing-module-missing-the-corout