AttributeError: module ‘lib‘ has no attribute ‘OpenSSL_add_all_algorithms‘

环境: Mac M1, python3.8

背景

使用 pip3 install pdfminer 报错:

AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

在这里插入图片描述

处理方式

删除python包: OpenSSL
即: rm -rf /Users/yh/Library/Python/3.8/lib/python/site-packages/OpenSSL/
在这里插入图片描述
也可以通过以下方法查看site-packages的位置:

import sys
print(sys.path)

版权声明:本文为a1368783069原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。