chcomin / pyvane

Python Vascular Network Analysis
Other
22 stars 4 forks source link

ModuleNotFoundError: No module named 'pyvane.graph' #4

Open estela-mar22 opened 1 week ago

estela-mar22 commented 1 week ago

I'm encountering a ModuleNotFoundError when trying to import pipeline and image from the pyvane library:

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 7
      5 import sys
      6 sys.path.insert(0, '../')
----> 7 from pyvane import pipeline, image

File c:\Users\Lab\.conda\envs\skeleton\Lib\site-packages\pyvane\__init__.py:1
----> 1 from . import (file_util, image, img_io, measure, 
      2                segmentation, skeleton, tortuosity, util, window_extraction)

File c:\Users\Lab\.conda\envs\skeleton\Lib\site-packages\pyvane\measure.py:6
      4 import numpy as np
      5 import scipy.ndimage as ndi
----> 6 from .graph.adjustment import path_length
      7 from .tortuosity import tortuosity as tort_func
      9 def xy_roi_to_volume(img_roi, num_planes):

ModuleNotFoundError: No module named 'pyvane.graph'

I checked the installation directory and couldn't find the graph module there either. Thank you for your help!

chcomin commented 3 days ago

The import is working fine here. Notice that the line

from .graph.adjustment import path_length

imports function path_length inside the file pyvane/graph/adjustment.py. This file is in the repository.

Maybe it is a problem with the installation. I noticed that your pyvane is inside the site-packages directory, which is usually reserved for actual package installations. You don't need to "install" pyvane. You can just download it and execute the tutorial notebook.