I am trying to read *.hdr image using imageio python library. I am using the free image plugin for imageio in order to do this.
imageio.plugins.freeimage.download()
However I get the following error even though I am connected to the internet.
Ascertaining binaries for: freeimage.
Imageio: 'libfreeimage-3.16.0-osx10.6.dylib' was not found on your computer; downloading it now.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)>.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)>.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)>.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)>.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/imageio_download_bin", line 8, in <module>
sys.exit(download_bin_main())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/__main__.py", line 95, in download_bin_main
download_bin(plugin_names=args.plugin, package_dir=args.package_dir)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/__main__.py", line 61, in download_bin
mod.download(directory=directory)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/plugins/_freeimage.py", line 66, in download
get_remote_file(fname=fname, directory=directory, force_download=force_download)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/core/fetching.py", line 128, in get_remote_file
_fetch_file(url, filename)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/core/fetching.py", line 187, in _fetch_file
% os.path.basename(file_name)
OSError: Unable to download 'libfreeimage-3.16.0-osx10.6.dylib'. Perhaps there is a no internet connection? If there is, please report this problem.
Development environment
MacOS 11.2.1
I even tried manually downloading the file from github but did not succeed in reading the HDR files.
This command solved the issue as mentioned here
sudo /Applications/Python\ 3.6/Install\ Certificates.command