hampel_filter
hampel_filter copied to clipboard
issue when importing hampel
Hello I am experiencing an error while importing hampel lib with my python3.8 : I am not sure what to do with this. Would you have some hints? thank you in advance, best regards Yoann
from hampel import hampel Traceback (most recent call last): File "
", line 1, in File "/usr/local/lib/python3.8/dist-packages/hampel/init.py", line 1, in from .hampel import hampel File "/usr/local/lib/python3.8/dist-packages/hampel/hampel.py", line 5, in from hampel.extension.hampel import hampel as hampel_extension File "src/hampel/extension/hampel.pyx", line 1, in init hampel.extension.hampel ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use ' numpy._import_array' to disable if you are certain you don't need it).
Hi! Can you tell me which version of the library are you using? and which specific version of Python?
Hi! Can you tell me which version of the library are you using? and which specific version of Python?
That way I can replicate your issue.
Hello, thank you very much for your reply
I am using the latest version of the lib I believe : here is the log from the install
pip install hampel Collecting hampel Downloading hampel-1.0.2.tar.gz (78 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.7/78.7 kB 4.8 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy>=1.17.3 in /usr/local/lib/python3.8/dist-packages (from hampel) (1.22.3) Collecting pandas (from hampel) Downloading pandas-2.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (18 kB) Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.8/dist-packages (from pandas->hampel) (2.8.2) Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.8/dist-packages (from pandas->hampel) (2022.1) Collecting tzdata>=2022.1 (from pandas->hampel) Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 341.8/341.8 kB 16.3 MB/s eta 0:00:00 Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/dist-packages (from python-dateutil>=2.8.2->pandas->hampel) (1.16.0) Downloading pandas-2.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.4/12.4 MB 102.2 MB/s eta 0:00:00 Building wheels for collected packages: hampel Building wheel for hampel (pyproject.toml) ... done Created wheel for hampel: filename=hampel-1.0.2-cp38-cp38-linux_x86_64.whl size=237118 sha256=f7a097e665b0d33235ca413502dacdccc27db31a0c39189a28d2d611e3de701e Stored in directory: /root/.cache/pip/wheels/59/0c/92/7bf70b53b36c60b5d87fcd9dc468ba3b1b74b7893ac5f9f544 Successfully built hampel DEPRECATION: distro-info 0.23ubuntu1 has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of distro-info or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063 DEPRECATION: gpg 1.13.1-unknown has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of gpg or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063 DEPRECATION: python-debian 0.1.36ubuntu1 has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of python-debian or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063 Installing collected packages: tzdata, pandas, hampel Successfully installed hampel-1.0.2 pandas-2.0.3 tzdata-2023.3 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
I use python3.8
On Mon, 27 Nov 2023 at 11:37, Miguel Otero Pedrido @.***> wrote:
Hi! Can you tell me which version of the library are you using? and which specific version of Python?
— Reply to this email directly, view it on GitHub https://github.com/MichaelisTrofficus/hampel_filter/issues/24#issuecomment-1827573725, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7RVYB6ZGEIBNUEXEMEX533YGRUPDAVCNFSM6AAAAAA73ZSR4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXGU3TGNZSGU . You are receiving this because you authored the thread.Message ID: @.***>
Can you try re-installing numpy?
pip install -U numpy
And then:
from hampel import hampel
Hi Again,
Successfully installed numpy-1.24.4
from hampel import hampel Traceback (most recent call last): File "
", line 1, in File "/usr/local/lib/python3.8/dist-packages/hampel/init.py", line 1, in from .hampel import hampel File "/usr/local/lib/python3.8/dist-packages/hampel/hampel.py", line 5, in from hampel.extension.hampel import hampel as hampel_extension File "src/hampel/extension/hampel.pyx", line 1, in init hampel.extension.hampel ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use ' numpy._import_array' to disable if you are certain you don't need it).
seems like this has not fixed the issue. Where you able to reproduce the error and the new install fixed it for you?
On Mon, 27 Nov 2023 at 15:16, Miguel Otero Pedrido @.***> wrote:
Can you try re-installing numpy?
pip install -U numpy
And then:
from hampel import hampel
— Reply to this email directly, view it on GitHub https://github.com/MichaelisTrofficus/hampel_filter/issues/24#issuecomment-1827918384, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7RVYB3WAZ32KLTO6MMXICTYGSODZAVCNFSM6AAAAAA73ZSR4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXHEYTQMZYGQ . You are receiving this because you authored the thread.Message ID: @.***>