我正在尝试使用imageio库读取*.hdr图像。为了做到这一点,我使用了imageio的免费图像插件。
imageio.plugins.freeimage.download()
然而,我得到了以下错误,即使我是连接到互联网。
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.
开发环境
MacOS 11.2.1
我甚至尝试从github手动下载该文件,但没有成功地读取HDR文件。
发布于 2021-02-18 18:39:53
此命令解决了前面提到的这里 sudo /Applications/Python\ 3.6/Install\ Certificates.command
问题。
https://stackoverflow.com/questions/66264772
复制相似问题