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

ImportError: cannot import name cache in python2.7 #744

Closed
anitair opened this issue Jul 5, 2018 · 1 comment
Closed

ImportError: cannot import name cache in python2.7 #744

anitair opened this issue Jul 5, 2018 · 1 comment
Labels
already fixed Problems that we've already solved
Milestone

Comments

@anitair
Copy link

anitair commented Jul 5, 2018

Importing librosa in python2.7 runs into this error:

import librosa
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/librosa/init.py", line 11, in
from . import cache
ImportError: cannot import name cache

It's been suggested elsewhere to install the package using conda /Anaconda or clone and install the repository to solve this issue, but in my particular working conditions I need to install it via pip.

Checking the source code, I've managed to make it work by modifying line 49 in cache.py from:
if self.cachedir is not None and self.level >= level:
to
if self.location is not None and self.level >= level:

Does this make any sense?

Thanks!

@bmcfee bmcfee added the already fixed Problems that we've already solved label Jul 5, 2018
@bmcfee
Copy link
Member

bmcfee commented Jul 5, 2018

The cachedir/location issue #729 has already been fixed #730, and will be included in the 0.6.2 release. The discussion in #729 and #732 describes how to work around the problem.

@bmcfee bmcfee added this to the 0.6.2 milestone Aug 2, 2018
@bmcfee bmcfee closed this as completed Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
already fixed Problems that we've already solved
Development

No branches or pull requests

2 participants