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

2023. 5. 28. 18:29ใ†Backend/๐Ÿ Python

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 ๋ฅผ ํ˜ธ์ถœํ•˜๋ฉด ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰๋œ๋‹ค.