-
Notifications
You must be signed in to change notification settings - Fork 69
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
install PyMeshLab on M1-chip #167
Comments
Hi, |
I do have an MBP 2021 with an M1 Processor and I am interested in installing this on a Mac. If I can help you with that, please let me know. But I have to admit that I am pretty clueless when it comes to the whole Wheel-Stuff. You might have to give me precise instructions on how to be helpful :) |
Right now, we cannot automate the build of m1 (see cnr-isti-vclab/meshlab#1172 and actions/runner-images#2187).
Also knowing if right now it builds easily would help for a future release! |
After sorting out some path-stuff with Qt5 it built just fine with and without the 1_build.sh script. 👍 |
Great @StWiemann, thanks!
|
@alemuntoni Sorry that it took me so long. I encountered an error I tried sorting out beforehand and it turned out that I didn't clone the whole repository correctly. That took some time to figure out. But after that everything worked fine and I was able to import pymeshlab. :) |
@StWiemann that's great! Then we just need to wait until github actions makes available M1 virtual machines..
You'll need to run |
Tried it with a conda and a pyenv virtual env of python 3.9 just to make sure that it isn't conda-related: When I do ============================= test session starts ==============================
platform darwin -- Python 3.9.9, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/stephan/git/test-pymesh/PyMeshLab
collected 9 items
pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py F [ 11%]
pymeshlab/dummybin.app/Contents/tests/test_delete_small_components.py F [ 22%]
pymeshlab/dummybin.app/Contents/tests/test_hausdorff.py F [ 33%]
pymeshlab/dummybin.app/Contents/tests/test_laplacian_smoothing.py F [ 44%]
pymeshlab/dummybin.app/Contents/tests/test_merge_meshes.py F [ 55%]
pymeshlab/dummybin.app/Contents/tests/test_mesh_booleans.py F [ 66%]
pymeshlab/dummybin.app/Contents/tests/test_number_plugins.py F [ 77%]
pymeshlab/dummybin.app/Contents/tests/test_select_faces_with_edge_longer_than.py F [ 88%]
[ 88%]
pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py F [100%]
=================================== FAILURES ===================================
____________________________ test_ambient_occlusion ____________________________
@pytest.mark.glcontext
def test_ambient_occlusion():
print('\n')
base_path = samples_common.samples_absolute_path()
output_path = samples_common.test_output_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py:13: AttributeError
----------------------------- Captured stdout call -----------------------------
_________________________ test_delete_small_components _________________________
def test_delete_small_components():
print('\n')
base_path = samples_common.samples_absolute_path()
output_path = samples_common.test_output_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_delete_small_components.py:9: AttributeError
----------------------------- Captured stdout call -----------------------------
________________________________ test_hausdorff ________________________________
def test_hausdorff():
print('\n')
base_path = samples_common.samples_absolute_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_hausdorff.py:8: AttributeError
----------------------------- Captured stdout call -----------------------------
___________________________ test_laplacian_smoothing ___________________________
def test_laplacian_smoothing():
print('\n')
output_path = samples_common.test_output_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_laplacian_smoothing.py:8: AttributeError
----------------------------- Captured stdout call -----------------------------
______________________________ test_merge_meshes _______________________________
def test_merge_meshes():
print('\n')
base_path = samples_common.samples_absolute_path()
output_path = samples_common.test_output_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_merge_meshes.py:9: AttributeError
----------------------------- Captured stdout call -----------------------------
______________________________ test_mesh_booleans ______________________________
def test_mesh_booleans():
print('\n')
base_path = samples_common.samples_absolute_path()
output_path = samples_common.test_output_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_mesh_booleans.py:9: AttributeError
----------------------------- Captured stdout call -----------------------------
_____________________________ test_number_plugins ______________________________
def test_number_plugins():
print('\n')
> n_plugins = ml.number_plugins()
E AttributeError: module 'pymeshlab' has no attribute 'number_plugins'
pymeshlab/dummybin.app/Contents/tests/test_number_plugins.py:6: AttributeError
----------------------------- Captured stdout call -----------------------------
___________________ test_select_faces_with_edge_longer_than ____________________
def test_select_faces_with_edge_longer_than():
print('\n')
base_path = samples_common.samples_absolute_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_select_faces_with_edge_longer_than.py:8: AttributeError
----------------------------- Captured stdout call -----------------------------
_______________________ test_texture_map_defragmentation _______________________
@pytest.mark.glcontext
def test_texture_map_defragmentation():
print('\n')
base_path = samples_common.samples_absolute_path()
output_path = samples_common.test_output_path()
> ms = ml.MeshSet()
E AttributeError: module 'pymeshlab' has no attribute 'MeshSet'
pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py:13: AttributeError
----------------------------- Captured stdout call -----------------------------
=============================== warnings summary ===============================
pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py:8
/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py:8: PytestUnknownMarkWarning: Unknown pytest.mark.glcontext - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.glcontext
pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py:8
/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py:8: PytestUnknownMarkWarning: Unknown pytest.mark.glcontext - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.glcontext
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py::test_ambient_occlusion
FAILED pymeshlab/dummybin.app/Contents/tests/test_delete_small_components.py::test_delete_small_components
FAILED pymeshlab/dummybin.app/Contents/tests/test_hausdorff.py::test_hausdorff
FAILED pymeshlab/dummybin.app/Contents/tests/test_laplacian_smoothing.py::test_laplacian_smoothing
FAILED pymeshlab/dummybin.app/Contents/tests/test_merge_meshes.py::test_merge_meshes
FAILED pymeshlab/dummybin.app/Contents/tests/test_mesh_booleans.py::test_mesh_booleans
FAILED pymeshlab/dummybin.app/Contents/tests/test_number_plugins.py::test_number_plugins
FAILED pymeshlab/dummybin.app/Contents/tests/test_select_faces_with_edge_longer_than.py::test_select_faces_with_edge_longer_than
FAILED pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py::test_texture_map_defragmentation
======================== 9 failed, 2 warnings in 0.04s ========================= When I try it with just ============================= test session starts ==============================
platform darwin -- Python 3.9.9, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/stephan/git/test-pymesh/PyMeshLab
collected 0 items / 9 errors
==================================== ERRORS ====================================
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_delete_small_components.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_delete_small_components.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_delete_small_components.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_hausdorff.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_hausdorff.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_hausdorff.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_laplacian_smoothing.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_laplacian_smoothing.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_laplacian_smoothing.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_merge_meshes.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_merge_meshes.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_merge_meshes.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_mesh_booleans.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_mesh_booleans.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_mesh_booleans.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_number_plugins.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_number_plugins.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_number_plugins.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_select_faces_with_edge_longer_than.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_select_faces_with_edge_longer_than.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_select_faces_with_edge_longer_than.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
_ ERROR collecting src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py _
ImportError while importing test module '/Users/stephan/git/test-pymesh/PyMeshLab/src/build/distrib/pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/stephan/.pyenv/versions/3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py:1: in <module>
import pymeshlab as ml
E ModuleNotFoundError: No module named 'pymeshlab'
=========================== short test summary info ============================
ERROR pymeshlab/dummybin.app/Contents/tests/test_ambient_occlusion.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_delete_small_components.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_hausdorff.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_laplacian_smoothing.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_merge_meshes.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_mesh_booleans.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_number_plugins.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_select_faces_with_edge_longer_than.py
ERROR pymeshlab/dummybin.app/Contents/tests/test_texture_map_defragmentation.py
!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 9 errors in 0.06s ============================= Not sure why it can't find pymeshlab. |
Ran into a very odd issue building from source on an M1 (latest master). Have a work-around but thought I'd share it in case it effects others.
Crash report------------------------------------- Translated Report (Full Report Below) -------------------------------------
|
Oh ok, thanks @David-Baddeley. Then we will need to sign all the libraries used by pymeshlab when releasing for m1. It shouldn't be an issue. |
Hey there, I am just following up on the installation on an M1 chip. I now managed to build the pymeshlab without any errors.
Any idea, where this could be coming from? |
@jabrucohee did you build pymeshlab using the script we provided (this one)? After calling |
@alemuntoni , I tried both versions once with the script and once by typing cmake .. && make && make install. In both cases I get that error. However, I installed qt5 using Homebrew. Since it couldn't find it at the beginning, I needed to use
which directs to the folder where qt5 is installed. When using the script I added this part to the line
So I used
before that it wouldn't built, but than it did Could this be related ? this is the only. alteration that I made. I checked and I did run make install thanks in advance ! |
Ok, you should remove from the command the options |
Thanks, I tried that, but no luck unfortunately, the error persists |
m1 sillicon pymeshlab pytest success note.
Wish this helps someone need. |
Hey there thanks for that comment, it seems to be a different issue entirely. It turns out that Pymeshlab seems to work fine with python version 3.9. but it does not work with python version 3.10. At least not on the mac. If you use python version 3.10 the above mentioned error occurs. With or without the -DBUILD_DUMMY_BIN_MAC_DEPLOY decorator. I don't know where this issue comes from. To those of you have managed to get it to run: which Python version were you using? Unfortunatley, my application also heavily relies on tkinter which seems to be behaving badly with python version 3.9 in python. So I cannot do anything unfortunately. If somebody mananges to find a fix, that would be greatly appreciated |
The new |
Was anyone able to get it to build with Python 3.10? |
Just an update here: Issue actions/runner-images#2187 has been closed since M1 large runners have been released. However, large runners are available only for paying accounts. Anyway, for the next version, I'll build a package and release it for m1 (probably just for one version of python, like 3.11) |
That would be amazing. If it's only practical to do one Python version, would you be open to doing 3.10 to keep pymeshlab in sync with Blender's standalone Python module (which for the current, next, and latest LTS versions only works with 3.10)? |
Hi everybody, After trying and crying a lot, I finally got some native arm wheels of pymeshlab. Before uploading them on PyPi, I would like to get some feedback from you. It would be really appreciated. If you can, please download the right wheel for your python version, and then run Thank you everybody for the help! |
Amazing! Can't import it yet, there seems to be a Qt linking error. I'm on Ventura 13.6, tried installing pyqt5 and pyqt using brew but no change. |
@n1ckfg thanks! I guess I'll have to cry some more... :D |
Sure--what's the exact install string you'd like to try? I've already tried |
@n1ckfg |
Tried qt@5 and adding to path in .bash_profile, no luck. This suggests upgrading to Sonoma as a fix: |
Thanks @n1ckfg! |
Thanks--I upgraded to Sonoma and it does import, load, and save correctly! Filters seem to partly work too, if called by function name. Using apply_filter() with a string crashes to bash with |
You can use FlyCI's M1 and M2 runners. Our runners are on average 2x faster and 2x cheaper than GitHub's AND we have a free tier for OSS projects (see below). Install InstructrionsEasily replace your M1 runners: jobs:
ci:
- runs-on: macos-latest
+ runs-on: flyci-macos-large-latest-m1
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4 Or try the M2 runners: jobs:
ci:
- runs-on: macos-latest
+ runs-on: flyci-macos-large-latest-m2
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4 Pricing
500 mins/month Free for Public ReposIf your repo is public, then FlyCI offers 500 mins/month of free M1 runner usage with the Best Regards, |
I have created a native PyMeshLab release using github actions, that you can download from here (choose the wheel based on your Python version): https://github.com/alemuntoni/PyMeshLab/releases/tag/v2024.3 Please try it and let me know if you encounter any problems! Starting from the next release, pymeshlab will be available for download from pip also for Mac M1. |
Trying it out now--thanks! |
Hi,
Currently, this useful lib could not be installed via pip on my M1-chip Mac.
Do you have any plan for providing the installation option?
Thank you.
The text was updated successfully, but these errors were encountered: