AttributeError: module 'inspect' has no attribute 'isgenerator'
See original GitHub issueThe latest version of librosa seems to errors out at import. Below is the full error message I get on pycharm
`Traceback (most recent call last): File “C:/Users/tkim1/.PyCharmCE2018.2/config/scratches/SpecCen.py”, line 1, in <module> import librosa
File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\librosa_init_.py”, line 11, in <module> from . import cache
File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\librosa\cache.py”, line 7, in <module> from joblib import Memory
File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\joblib_init_.py”, line 112, in <module> from .memory import Memory, MemorizedResult, register_store_backend
File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\joblib\memory.py”, line 15, in <module> import pydoc
File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\pydoc.py”, line 62, in <module> import inspect
File “C:\Users\tkim1.PyCharmCE2018.2\config\scratches\inspect.py”, line 3, in <module> import twitter_scraper as module
File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\twitter_scraper.py”, line 2, in <module> from requests_html import HTMLSession, HTML
File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\requests_html.py”, line 2, in <module> import asyncio
File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\asyncio_init_.py”, line 8, in <module> from .base_events import *
File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 39, in <module> from . import events
File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\asyncio\events.py”, line 787, in <module> from _asyncio import (_get_running_loop, _set_running_loop,
AttributeError: module ‘inspect’ has no attribute ‘isgenerator’`
I tried to rollback to previous versions of librosa to see if that would solve anything but did not have any luck
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@lostanlen You were right, my issue was caused by an old version of
joblib (0.11)
. I upgraded it to0.13.2
and nowlibrosa 0.7.0
works. Thanks for your help. I will definitely look into using conda from now on.@srubenacker upgrading from 0.5.1 to 0.7.0 is a pretty huge leap, so you are going to have to make sure that all of the other installed packages are also upgraded accordingly. In a conda environment, this would be automatic. My guess is that your installation of librosa interferes with other packages (in this case joblib). My advice is to always install librosa in a conda environment, unless you have a really compelling reason not to do so. If i were to debug your installation, the first command i would try is:
which python3
and if it’s a pip python:
pip freeze