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 ๋ฅผ ํธ์ถํ๋ฉด ์ ์์ ์ผ๋ก ์คํ๋๋ค.
