Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

后端 未结 20 1641
無奈伤痛
無奈伤痛 2020-11-29 02:06

A Python script of mine is failing with:

Traceback (most recent call last):
  File \"./inspect_sheet.py\", line 21, in 
    main()
  File \"./i         


        
20条回答
  •  佛祖请我去吃肉
    2020-11-29 02:55

    My solution was a lot more simplistic after these other solutions not working for me. Anything I tried to install/uninstall via pip returned the same error and stacktrace.

    I ended up trying to update pip via pip3 and it worked flawlessly:

    pip3 install --upgrade pip

    I went back to using pip and everything worked correctly. I did notice that it was referencing Python 3.6 when running the pip commands though.

    # pip install pyopenssl`enter code here`
    Requirement already satisfied: pyopenssl in /usr/lib64/python3.6/site-packages (18.0.0)
    
    
    
    Requirement already satisfied: pycparser in /usr/lib64/python3.6/site-packages (from cffi!=1.11.3,>=1.7->cryptography>=2.2.1->pyopenssl) (2.19)
    

提交回复
热议问题