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

Error using edivisive #19

Open
angus-c opened this issue Jun 9, 2021 · 4 comments
Open

Error using edivisive #19

angus-c opened this issue Jun 9, 2021 · 4 comments

Comments

@angus-c
Copy link

angus-c commented Jun 9, 2021

Hi!

When I try to run a simple e-divisive example I'm getting a dependency error.
I'm new to python package infrastructure so it's possible I did a bad install (I used pip)

Code

from signal_processing_algorithms.energy_statistics import energy_statistics
series = [1,2,3,4]

change_points = energy_statistics.e_divisive(series, pvalue=0.01, permutations=100)

Error

Traceback (most recent call last):
  File "/Users/me/Library/Python/3.8/lib/python/site-packages/signal_processing_algorithms/energy_statistics/cext_calculator.py", line 20, in <module>
    LIB_E_DIVISIVE = np.ctypeslib.load_library("_e_divisive", so_path)
  File "/Users/me/Library/Python/3.8/lib/python/site-packages/numpy/ctypeslib.py", line 153, in load_library
    raise OSError("no file with expected extension")
OSError: no file with expected extension
Traceback (most recent call last):
  File "edivisive-tester.py", line 1, in <module>
    from signal_processing_algorithms.energy_statistics import energy_statistics
  File "/Users/me/Library/Python/3.8/lib/python/site-packages/signal_processing_algorithms/energy_statistics/energy_statistics.py", line 9, in <module>
    from signal_processing_algorithms.energy_statistics.cext_calculator import (
ImportError: cannot import name 'calculate_distance_matrix' from 'signal_processing_algorithms.energy_statistics.cext_calculator' (/Users/me/Library/Python/3.8/lib/python/site-packages/signal_processing_algorithms/energy_statistics/cext_calculator.py)

Python 3.8.2
signal-processing-algorithms 2.0.0

@uglycoyote
Copy link

I'm also getting the same thing, any solution?

@angus-c
Copy link
Author

angus-c commented Nov 18, 2021

IIRC I removed the C++ portion of the code.

@sfc-gh-dbuse
Copy link

Probably related to poetry 1.4. See python-poetry/poetry#2740 (comment) for details. Probably the solution will be to just include generate-setup-file = true in the pyproject.toml

@vimiix
Copy link

vimiix commented Apr 17, 2024

I got the same error.

Downgrade the version of poetry to 1.3.2 can fix this, then run:

poetry build

It will generate a whl package corresponding to the python version in the current directory

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