pmneila / PyMCubes

Marching cubes (and related tools) for Python
BSD 3-Clause "New" or "Revised" License
709 stars 89 forks source link

Failed to find exporter after installation #4

Closed andrewdalecramer closed 8 years ago

andrewdalecramer commented 8 years ago

Hey, got it to compile and install but still doesn't run

Traceback (most recent call last): File "generate.py", line 6, in import mcubes File "/home/user/local/anaconda3/lib/python3.4/site-packages/PyMCubes-0.0.4-py3.4-linux-x86_64.egg/mcubes/init.py", line 3, in from exporter import export_mesh ImportError: No module named 'exporter'

pmneila commented 8 years ago

Sorry, the library was developed and tested for Python 2, not Python 3. I'll fix that soon. In the meantime, you can just edit the file /home/user/local/anaconda3/lib/python3.4/site-packages/PyMCubes-0.0.4-py3.4-linux-x86_64.egg/mcubes/init.py and change the last line to

from .exporter import export_mesh

(note the extra dot before exporter). That should make it work.

andrewdalecramer commented 8 years ago

Ahhh, makes sense. Thanks for the support you've provided, I've ended up putting it into matlab and using isosurface now so don't stress too much.

pmneila commented 8 years ago

Hi,

I pushed some changes to make the library compatible with Python 2 and 3 and uploaded the new version to PyPI. All your problems should be fixed now.