在测试open3d是否正常顺利安装时,出现了如下错误:
python -c "import open3d as o3d; print(o3d.__version__)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/huangzhe/miniconda3/envs/open3d/lib/python3.8/site-packages/open3d/__init__.py", line 93, in <module>
from open3d.cpu.pybind import (core, camera, data, geometry, io, pipelines,
ImportError: dlopen(/Users/huangzhe/miniconda3/envs/open3d/lib/python3.8/site-packages/open3d/cpu/pybind.cpython-38-darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/libomp/lib/libomp.dylib
Referenced from: <A2C68595-9594-3758-BEFB-86BA2C701093> /Users/huangzhe/miniconda3/envs/open3d/lib/python3.8/site-packages/open3d/cpu/pybind.cpython-38-darwin.so
Reason: tried: '/opt/homebrew/opt/libomp/lib/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libomp/lib/libomp.dylib' (no such file), '/opt/homebrew/opt/libomp/lib/libomp.dylib' (no such file), '/usr/local/lib/libomp.dylib' (no such file), '/usr/lib/libomp.dylib' (no such file, not in dyld cache)
解决方法是运行如下命令:
brew install --build-from-source libomp
问题即可解决,再运行测试open3d版本号的命令:文章来源:https://www.toymoban.com/news/detail-635410.html
python3 -c "import open3d as o3d; print(o3d.__version__)"
即可显示版本号:
文章来源地址https://www.toymoban.com/news/detail-635410.html
到了这里,关于mac安装open3d时候出现错误的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!