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

Is it planned to build pythonocc-core for linux-arm64 ? #1339

Open
Spoutnik97 opened this issue May 26, 2024 · 6 comments
Open

Is it planned to build pythonocc-core for linux-arm64 ? #1339

Spoutnik97 opened this issue May 26, 2024 · 6 comments

Comments

@Spoutnik97
Copy link

I would like to install the library on a docker image build with my Macbook Pro M3.
Currently, the conda installer does not find pythonocc-7.7.2 because it is not available on conda-forge.

Should possible to build the library for linux-arm64 ? Or is there another solution ?
I could build it myself, but if the need is shared by someone else, we could share ressources and time

@tpaviot
Copy link
Owner

tpaviot commented May 26, 2024

there are binaries for osx-arm64 on conda, but not linux-arm64. I don't know if there are plans on the conda-forge side to provide linux-arm64 packages. You can try it by yourself and report here your results. I think that the pythonocc-binderhub docker file is a good place for you to start with https://github.com/tpaviot/pythonocc-binderhub/blob/build-master/Dockerfile

@Spoutnik97
Copy link
Author

Hi @tpaviot !
I tried to build the docker image. It works !

But the last command failed while executing python tests

ERROR collecting test_mypy_classic_occ_bottle.py _______________
0.380 ImportError while importing test module '/opt/pythonocc-core/test/test_mypy_classic_occ_bottle.py'.
0.380 Hint: make sure your test modules/packages have valid Python names.
0.380 Traceback:
0.380 /opt/conda/lib/python3.11/importlib/__init__.py:126: in import_module
0.380     return _bootstrap._gcd_import(name[level:], package, level)
0.380 test_mypy_classic_occ_bottle.py:22: in <module>
0.380     from [OCC.Core.gp](http://occ.core.gp/) import (
0.380 E   ModuleNotFoundError: No module named 'OCC'

Any idea where this could come from?

I will test the OCCT compiled lib to see if it seems ok, and will keep you informed

@tpaviot
Copy link
Owner

tpaviot commented Jun 5, 2024

@jenkoj what do you exactly mean with "7.8.1 seems to be corrupt"? Can you please post the full trace when installing 7.8.1 from conda-forge channel?

@tpaviot
Copy link
Owner

tpaviot commented Jun 5, 2024

ModuleNotFoundError: No module named 'OCC'

@jenkoj that means pythonocc is not installed in a known python path

@jenkoj
Copy link

jenkoj commented Jun 5, 2024

@tpaviot and @Spoutnik97, my mistake. I thought docker on M2 was using osx-arm64 and not linux-arm64. So please ignore my Dockerfile above. While it does install and import the package, the precompiled binaries dont work. To avioid confusion, I am deleting that comment.

@tpaviot when installing directly using wget, I noticed that 7.2.2 has compatible python version in its name (here), whereas 7.8.1 does not. So 7.8.1 is not corrupted, its just hard to find the right version for you python version.

As you suggested, only solution for running occ in container on mac is to build the occ from source.

@Spoutnik97
Copy link
Author

ModuleNotFoundError: No module named 'OCC'

@jenkoj that means pythonocc is not installed in a known python path

But it should work if it work for you. Where could be the problem ? Bad path ? Bad compilation ?

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

No branches or pull requests

3 participants