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

使用python出错

Traceback (most recent call last):
  File "setup.py", line 2, in 
    import x2paddle
  File "C:\Users\Administrator\Documents\X2Paddle\x2paddle\__init__.py", line 3, in 
    from .core.program import PaddleGraph
  File "C:\Users\Administrator\Documents\X2Paddle\x2paddle\core\program.py", line 17, in 
    import paddle.fluid as fluid
  File "D:\AN\lib\site-packages\paddle\__init__.py", line 31, in 
    import paddle.dataset
  File "D:\AN\lib\site-packages\paddle\dataset\__init__.py", line 18, in 
    import paddle.dataset.mnist
  File "D:\AN\lib\site-packages\paddle\dataset\mnist.py", line 23, in 
    import paddle.dataset.common
  File "D:\AN\lib\site-packages\paddle\dataset\common.py", line 17, in 
    import requests
  File "D:\AN\lib\site-packages\requests\__init__.py", line 95, in 
    from urllib3.contrib import pyopenssl
  File "D:\AN\lib\site-packages\urllib3\contrib\pyopenssl.py", line 46, in 
    import OpenSSL.SSL
  File "D:\AN\lib\site-packages\OpenSSL\__init__.py", line 8, in 
    from OpenSSL import rand, crypto, SSL
  File "D:\AN\lib\site-packages\OpenSSL\SSL.py", line 124, in 
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: module 'lib' has no attribute 'SSL_ST_INIT'

解决方式:

pip uninstall pyopenssl

 

你可能感兴趣的:(Python)