giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python
https://giotto-ai.github.io/gtda-docs
Other
845 stars 173 forks source link

I am trying to implement mnist classification project,but I meet the issue: no module named 'gtda.externals.modules.' ,I haven't found the folder named modules in externals. Can anyone help me? #611

Closed songxinyuty closed 3 years ago

songxinyuty commented 3 years ago

I can't find the folder named modules. The folder named modules is not in the externals folder.Then when I am trying to implement mnist classification project,Imeet the bug:no module named 'gtda.externals.modules Traceback (most recent call last): File "mnist_classification.py", line 13, in from gtda.homology import CubicalPersistence File "/home/sxy/giotto-tda-master/gtda/homology/init.py", line 5, in from .simplicial import VietorisRipsPersistence, WeightedRipsPersistence, \ File "/home/sxy/giotto-tda-master/gtda/homology/simplicial.py", line 18, in from ..externals.python import ripser, SparseRipsComplex, CechComplex File "/home/sxy/giotto-tda-master/gtda/externals/init.py", line 4, in from .modules.gtda_bottleneck import bottleneck_distance ModuleNotFoundError: No module named 'gtda.externals.modules'

Can anyone help me? Thank you very much!

ulupo commented 3 years ago

Hi! This is probably due to a bad installation. Could you guide me through the steps you followed to install the library?

songxinyuty commented 3 years ago

I download master from https://github.com/giotto-ai/giotto-tda/, then create the new linux environment which python =3.6.13 , then run the command: python -m pip install -U giotto-tda

ulupo commented 3 years ago

Thanks! Just to check: are you specifically wishing to build from sources (it is much easier to just install the PyPI distribution), or are you downloading the repository just as a way to have the notebooks?

Additionally, could you please uninstall, then remove the cloned repository, then repeat the steps you performed but share the outputs with us here?

ulupo commented 3 years ago

In addition, could you please make sure that pip itself is up-to-date? You can run python -m pip install -U --upgrade pip to upgrade pip to the latest version. Old versions of pip can misbehave in Linux systems.

songxinyuty commented 3 years ago

Thanks for your advice. I make sure that pip is up-to-date. I uninstall the repository and then install the PyPI distribution again,but I meet the same question: Traceback (most recent call last): File "", line 1, in File "/home/sxy/giotto-tda-master/gtda/homology/init.py", line 5, in from .simplicial import VietorisRipsPersistence, WeightedRipsPersistence, \ File "/home/sxy/giotto-tda-master/gtda/homology/simplicial.py", line 18, in from ..externals.python import ripser, SparseRipsComplex, CechComplex File "/home/sxy/giotto-tda-master/gtda/externals/init.py", line 4, in from .modules.gtda_bottleneck import bottleneck_distance ModuleNotFoundError: No module named 'gtda.externals.modules'

ulupo commented 3 years ago

Hi, thanks! I wasn't sufficiently clear. I meant if you could share the outputs of the python -m pip install -U giotto-tda step.

songxinyuty commented 3 years ago

I have solved the issue .Maybe I haven't clean it completely, Now it can work. Thank you very much!

ulupo commented 3 years ago

Glad the process was helpful!