TDA-tutorial icon indicating copy to clipboard operation
TDA-tutorial copied to clipboard

AttributeError: module 'gudhi' has no attribute 'AlphaComplex'

Open tanjia123456 opened this issue 4 years ago • 8 comments

Hello, thank you for your works When I run the Tuto-GUDHI-alpha-complex-visualization.py, the error message appears: ac = gudhi.AlphaComplex(off_file = 'datasets/tore3D_1307.off') AttributeError: module 'gudhi' has no attribute 'AlphaComplex'

This error message also appeared in other codes. Do you know how to solve it? Did the problem occur when I installed the gudhi library?

tanjia123456 avatar Mar 01 '21 07:03 tanjia123456

Hello, and thank you for the report @tanjia123456 . How did you install gudhi ? Did you install it with conda, with pip, or did you follow the installation manual ?

VincentRouvreau avatar Mar 01 '21 08:03 VincentRouvreau

I downloaded the .whl file and installed it offline (https://pypi.org/project/gudhi/#files).Is there a problem with this installation method?

tanjia123456 avatar Mar 01 '21 08:03 tanjia123456

By the way, I have convert .ipynb to .py use jupyter

tanjia123456 avatar Mar 01 '21 12:03 tanjia123456

If you add print(gudhi.__version__) before the line with AlphaComplex, does it print "3.4.1"? Which exact wheel file did you download?

mglisse avatar Mar 01 '21 21:03 mglisse

When I add print(gudhi.version) before the line with AlphaComplex gudhi version: 3.4.1 Traceback (most recent call last): File "F:/PH-Barcode/TDA-tutorial-master/Tuto-GUDHI-alpha-complex-visualization.py", line 11, in ac = gudhi.AlphaComplex(off_file = 'datasets/tore3D_1307.off') AttributeError: module 'gudhi' has no attribute 'AlphaComplex'

I have downloaded the gudhi-3.4.1-cp36-cp36m-win_amd64.whl, and installed it with pip command.

tanjia123456 avatar Mar 02 '21 01:03 tanjia123456

I have downloaded the gudhi-3.4.1-cp36-cp36m-win_amd64.whl, and installed it with pip command.

Ok, so next step is to check your python version:

$ python --version

It must be 3.6.X.

When you launch python in a command line, you can also verify that you installed the 64 bits version

Then you can check where gudhi is installed:

$ pip -V
pip X.Y.Z from /some/path/lib/python3.6/site-packages/pip (python 3.6)

It means gudhi is installed by pip in the directory /some/path/lib/python3.6/site-packages/gudhi. In this directory, you should have a alpha_complex.*.pyd (equivalent to a dll). Finally, you can check with a tool like dependency walker (on windows) that you have no dependencies issues.

VincentRouvreau avatar Mar 02 '21 08:03 VincentRouvreau

I have checked it, in the installed gudhi folder, files such as rips_complex.cp36-win_amd64.pyd are found, but alpha_complex.*.pyd is not found. I guess it is missing this file. Just download it and place it in the gudhi folder.

tanjia123456 avatar Mar 02 '21 08:03 tanjia123456

Install with "conda" fixed the problem.

heyunan avatar Apr 01 '21 03:04 heyunan