Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tanjia123456 opened this issue Mar 1, 2021 · 8 comments
Open

Comments

@tanjia123456
Copy link

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?

@VincentRouvreau
Copy link
Contributor

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 ?

@tanjia123456
Copy link
Author

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

@tanjia123456
Copy link
Author

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

@mglisse
Copy link
Member

mglisse commented Mar 1, 2021

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

@tanjia123456
Copy link
Author

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.

@VincentRouvreau
Copy link
Contributor

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.

@tanjia123456
Copy link
Author

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.

@heyunan
Copy link

heyunan commented Apr 1, 2021

Install with "conda" fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants