nuwandda / photo-enhancer

Enhance your photos using AI
MIT License
8 stars 6 forks source link

only supports OpenSSL 1.1.1+, #1

Open minidevbd opened 1 month ago

minidevbd commented 1 month ago

I'm installed openssl version 3.1.1 but still this error in below.

Traceback (most recent call last): File "enhance_image.py", line 4, in from torchvision.transforms import Resize, CenterCrop, ToTensor, Normalize File "C:\Python37\lib\site-packages\torchvision__init.py", line 5, in from torchvision import datasets, io, models, ops, transforms, utils File "C:\Python37\lib\site-packages\torchvision\datasets\init.py", line 1, in from ._optical_flow import FlyingChairs, FlyingThings3D, HD1K, KittiFlow, Sintel File "C:\Python37\lib\site-packages\torchvision\datasets_optical_flow.py", line 12, in from .utils import _read_pfm, verify_str_arg File "C:\Python37\lib\site-packages\torchvision\datasets\utils.py", line 22, in import requests File "C:\Python37\lib\site-packages\requests\init.py", line 43, in import urllib3 File "C:\Python37\lib\site-packages\urllib3\init__.py", line 42, in "urllib3 v2.0 only supports OpenSSL 1.1.1+, currently " ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0i 14 Aug 2018'. See: https://github.com/urllib3/urllib3/issues/2168

nuwandda commented 1 month ago

The reason why the error message mentioned OpenSSL 1.1.1+ and LibreSSL 2.8.3 is that urllib3 v2.0 (the version you've installed) requires OpenSSL 1.1.1+ to work properly, as it relies on some new features of OpenSSL 1.1.1.

You can try to install a newer version of OpenSSL or you can downgrade the version of urllib using pip install 'urllib3<2.0'.