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

Potential issue - Getting ValueError when importing from .cypesq import cypesq, cypesq_retvals, cypesq_error_message as pesq_error_message #615

Open
mgsram opened this issue May 1, 2022 · 1 comment
Labels
question Further information is requested

Comments

@mgsram
Copy link

mgsram commented May 1, 2022

I am trying to use asteroid and I did the following to setup the environment

  1. conda create --name audio_source_sep python=3.8
  2. conda activate audio_source_sep
  3. conda install pip3
  4. clone asteroid
  5. from the asteroid folder pip install -e .
  6. Launched python and did the following
(audio_src_sep) sriramg@pmac19 asteroid % python                               
Python 3.8.13 (default, Mar 28 2022, 06:16:26) 
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from asteroid.engine.optimizers import make_optimizer

And this resulted in a ValueError being reported

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sriramg/labs/source_sep/asteroid/asteroid/engine/__init__.py", line 1, in <module>
    from .system import System
  File "/Users/sriramg/labs/source_sep/asteroid/asteroid/engine/system.py", line 2, in <module>
    import pytorch_lightning as pl
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/pytorch_lightning/__init__.py", line 20, in <module>
    from pytorch_lightning import metrics  # noqa: E402
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/pytorch_lightning/metrics/__init__.py", line 15, in <module>
    from pytorch_lightning.metrics.classification import (  # noqa: F401
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/pytorch_lightning/metrics/classification/__init__.py", line 14, in <module>
    from pytorch_lightning.metrics.classification.accuracy import Accuracy  # noqa: F401
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/pytorch_lightning/metrics/classification/accuracy.py", line 16, in <module>
    from torchmetrics import Accuracy as _Accuracy
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/torchmetrics/__init__.py", line 14, in <module>
    from torchmetrics import functional  # noqa: E402
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/torchmetrics/functional/__init__.py", line 14, in <module>
    from torchmetrics.functional.audio.pit import permutation_invariant_training, pit_permutate
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/torchmetrics/functional/audio/__init__.py", line 23, in <module>
    from torchmetrics.functional.audio.pesq import perceptual_evaluation_speech_quality  # noqa: F401
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/torchmetrics/functional/audio/pesq.py", line 19, in <module>
    import pesq as pesq_backend
  File "/Users/sriramg/opt/anaconda3/envs/audio_src_sep/lib/python3.8/site-packages/pesq/__init__.py", line 6, in <module>
    from .cypesq import cypesq, cypesq_retvals, cypesq_error_message as pesq_error_message
  File "pesq/cypesq.pyx", line 1, in init cypesq
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

What am I missing here? I tried switching Numpy versions from 1.19.x to 1.20.3 etc. Also build and install python-pesq but no luck.

@mgsram mgsram added the question Further information is requested label May 1, 2022
@jonashaag
Copy link
Collaborator

Please file this here https://github.com/ludlows/python-pesq

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

No branches or pull requests

2 participants