LCAV / pyroomacoustics

Pyroomacoustics is a package for audio signal processing for indoor applications. It was developed as a fast prototyping platform for beamforming algorithms in indoor scenarios.
https://pyroomacoustics.readthedocs.io
MIT License
1.35k stars 419 forks source link

ImportError: cannot import name 'libroom' #172

Closed davidliujiafeng closed 3 years ago

davidliujiafeng commented 3 years ago

I can not find the libroom file, do I make anything wrong with it?????

fakufaku commented 3 years ago

Hi, thanks for reporting this! We need a little bit more information to diagnose what's going on. What platform and python version do you use, and how did try to install pyroomacoustics ?

Note that if you tried to install from source, you will need a compiler to build the package.

DavidTxx commented 3 years ago

Hi, Same issue for me, using pip for installing pyroomacoustics. I'm running it on a MacOS HighSierra 10.13.6, python 3.7.4.

Thanks!

Traceback here: Traceback (most recent call last): File "/Users/bach/Desktop/HAIKUS/DeepLearning/IR_Simulators/pyroomacoustics/pyroomSim.py", line 6, in <module> import pyroomacoustics as pra File "/Users/bach/Desktop/HAIKUS/DeepLearning/IR_Simulators/pyroomacoustics/pyroomacoustics/__init__.py", line 120, in <module> from . import libroom as libroom ImportError: cannot import name 'libroom' from 'pyroomacoustics' (/Users/bach/Desktop/HAIKUS/DeepLearning/IR_Simulators/pyroomacoustics/pyroomacoustics/__init__.py)

fakufaku commented 3 years ago

Hi @DavidTxx in your case, I think I know what is going on. It seems that you installed pyroomacoustics using pip but also cloned the repository, and you are running your script from within the directory of the cloned repository (/Users/bach/Desktop/HAIKUS/DeepLearning/IR_Simulators/pyroomacoustics/pyroomSim.py). It seems that the working directory is part of your python path and thus the copy of pyroomacoustics cloned from github is the first one found by python, before it reaches the package installed by pip. However, the clone from github needs to be built or it will throw the error you are seeing. To get rid of the error, you should either run your script from a different directory, or remove the working directory from the python path.

ShreJais commented 3 years ago

I also got the same problem but after checking and reinstalling each required packages individually as mentioned in requirments.txt . I didnt get any error.

20050710212 commented 3 years ago

Hi, I got the same issue. I have installed all required packages and reinstalled the pyroomacoustics by using pip. I am running it on Windows10 Home (version 1903), Pycharm 2019.2.4 (Community), Python 3.6.5 or 3.6.10. I have used Pyroomacoustics successfully half years ago.

>>> import pyroomacoustics as pra
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda3\lib\site-packages\pyroomacoustics\__init__.py", line 120, in <module>
    from . import libroom as libroom
ImportError: DLL load failed: cannot find the module

Thank you so much.

fakufaku commented 3 years ago

This looks like the same problem as above. Have you tried this ?

It seems that the working directory is part of your python path and thus the copy of pyroomacoustics cloned from github is the first one found by python, before it reaches the package installed by pip. However, the clone from github needs to be built or it will throw the error you are seeing. To get rid of the error, you should either run your script from a different directory, or remove the working directory from the python path.

YangangCao commented 3 years ago

Hi @DavidTxx in your case, I think I know what is going on. It seems that you installed pyroomacoustics using pip but also cloned the repository, and you are running your script from within the directory of the cloned repository (/Users/bach/Desktop/HAIKUS/DeepLearning/IR_Simulators/pyroomacoustics/pyroomSim.py). It seems that the working directory is part of your python path and thus the copy of pyroomacoustics cloned from github is the first one found by python, before it reaches the package installed by pip. However, the clone from github needs to be built or it will throw the error you are seeing. To get rid of the error, you should either run your script from a different directory, or remove the working directory from the python path.

it works for me, thanks!