Skip to content

module 'igl' has no attribute 'read_triangle_mesh' #85

Closed

Description

@LTan229

Hi!
I'm begining to learn this package following your tutorial, but I'm finding it hard to start. The following simple code is raising errors

import igl
import scipy as sp
import numpy as np
from meshplot import plot, subplot, interact

if __name__ == '__main__':
    v,f = igl.read_triangle_mesh("3_1.ply")
    k = igl.gaussian_curvature(v,f)
    print(k)
    plot(v,f,k)

errors are:

Traceback (most recent call last):
    File "D:/my/directory/test.py", line 1, in <module>
      import igl
    File "D:\Program Files\Miniconda3\lib\site-packages\igl\__init__.py", line 1, in <module>
      from .pyigl import *
  ModuleNotFoundError: No module named 'igl.pyigl'

I checked the installed package and it looks like:

igl
|--__pycache__
|--__init__.py
|--helpers.py
|--pyigl.cp38-win_amd64.pyd
|--pyigl.cp38-win_amd64.pyd.manifest
|--pyigl_classes.cp38-win_amd64.pyd
|--pyigl_classes.cp38-win_amd64.pyd.manifest

I tried to reformat the file into:

igl
|--__pycache__
|--__init__.py
|--helpers.py
|--pyigl
    |--cp38-win_amd64.pyd
    |--cp38-win_amd64.pyd.manifest
|--pyigl_classes
    |--cp38-win_amd64.pyd
    |--cp38-win_amd64.pyd.manifest

and it begin to give errors:

Traceback (most recent call last):
  File "D:/my/directory/test.py", line 7, in <module>
    v,f = igl.read_triangle_mesh("3_1.ply")
AttributeError: module 'igl' has no attribute 'read_triangle_mesh'

Process finished with exit code 1

Any idea what's going on? Thank you!

Activity

  1. teseoch commented on Jun 2, 2021

    @teseoch
    Collaborator

    it seems something went wrong on the conda installation

    changing the structure on the conda files shouldn't be necessary

  2. dyy0205 commented on Sep 6, 2022

    @dyy0205

    hi, have you solve this error? @MonteCrystal

  3. alecjacobson commented on Feb 6, 2023

    @alecjacobson
    Contributor

    I'm hoping this has been fixed by the pip installation changes #164 (pip install libigl). If this is still an issue, feel free to reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions