Backend/🐍 Python

[Open AI API μ—λŸ¬] ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3

Hugehoo 2023. 5. 28. 18:29

FastAPI 둜 μ°Œν”Όν‹° import ν•  λ•Œ λ°œμƒν•œ μ—λŸ¬

FastAPI 내뢀에 μ„€μΉ˜λœ urllib3 v2.0 이 OpenSSL 1.1.1+ λ²„μ „λ§Œ μ§€μ›ν•œλ‹€κ³  ν•œλ‹€. 

 

Error message

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168

 

 

그럼 μ–΄λ–»κ²Œ ν• κΉŒ? μ—λŸ¬λ₯Ό ν•΄κ²°ν•˜λŠ” μ—¬λŸ¬ 방법이 μžˆμ§€λ§Œ, ν•„μžλŠ” κ°„λ‹¨νžˆ urllib3의 버전을 2.0보닀 μ•„λž˜λ‘œ λ‹€μš΄κ·Έλ ˆμ΄λ“œ ν–ˆλ‹€

 

ν•΄κ²°

pip uninstall urllib3
pip install 'urllib3<2.0'

 

 

λ‹€μš΄κ·Έλ ˆμ΄λ“œ ν›„ fastApi λ₯Ό μ‹€ν–‰ν•˜μž. 

endpoint λ₯Ό ν˜ΈμΆœν•˜λ©΄ μ •μƒμ μœΌλ‘œ μ‹€ν–‰λœλ‹€.