Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import error: Open Multi-Processing? #191

Open
kcfriend opened this issue Aug 27, 2024 · 1 comment
Open

import error: Open Multi-Processing? #191

kcfriend opened this issue Aug 27, 2024 · 1 comment

Comments

@kcfriend
Copy link

When I import only cloudcompy, the program runs normally. However, when I add import open3d after it, the following error occurs:
(myenvpy310) zxc@zxcdeMacBook-Pro CloudComPy310 % python /Users/zxc/Documents/Projects/0731reconstruct/zxcTest/cclabel_main.py
JsonRPCPlugin::JsonRPCPlugin
OMP: Error #179: Function pthread_mutex_init failed:
OMP: System error #22: Invalid argument
zsh: abort python /Users/zxc/Documents/Projects/0731reconstruct/zxcTest/cclabel_main.py

If I swap the order of the imports, i.e., import open3d first and then cloudcompy, I get the following error:
Traceback (most recent call last):

File "/Users/zxc/Documents/Projects/0731reconstruct/zxcTest/cclabel_main.py", line 3, in
import ccLabel
File "/Users/zxc/Documents/Projects/0731reconstruct/zxcTest/ccLabel.py", line 3, in
import cloudComPy as cc
File "/Users/zxc/Downloads/CloudComPy310/cloudComPy/init.py", line 34, in
from _cloudComPy import *
ImportError: dlopen(/Users/zxc/Downloads/CloudComPy310/CloudCompare/CloudCompare.app/Contents/Frameworks/_cloudComPy.cpython-310-darwin.so, 0x0002): Symbol not found: _opj_decoder_set_strict_mode
Referenced from: /Users/zxc/Downloads/CloudComPy310/CloudCompare/CloudCompare.app/Contents/Frameworks/libgdal.32.dylib
Expected in: /opt/miniconda3/envs/myenvpy310/lib/libopenjp2.2.4.0.dylib

I use the .zsh to activate these, could you help me figure out the soulution?

@prascle
Copy link
Collaborator

prascle commented Aug 31, 2024

Hello, sorry for the late reply, I didn't have my mac to test.

I can't reproduce your problem. I work with the conda CloudComPy310 environment described in the documentation. I add open3d to the conda environment with conda install open3d. In this environment, I can import cloudComPy and open3d in any order and execute cloudComPy and open3d scripts (I use . bin/condaCloud.zsh activate CloudComPy310 to load the conda environment and set the PYTHONPATH for cloudComPy).

However, the implementation of openMP is tricky on macOS, it is used by cloudComPy and probably also by open3d and I guess it works because conda provides a consistent configuration for both packages.

Best regards,
Paul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants