Apr-30-2017, 04:37 PM
Pages: 1 2
Apr-30-2017, 05:05 PM
https://docs.python.org/2.7/library/importlib.html
Upgrade to a version of python which has that module?
(Apr-30-2017, 04:37 PM)Bani Wrote: [ -> ]Hi,
I use Python 2.7. ... What should I do?
Upgrade to a version of python which has that module?
May-01-2017, 04:48 AM
I have the same error in python3.5.
May-01-2017, 05:53 AM
Mind showing the full traceback? I'm on 3.6, so I can't replicate exactly what you're on, but it seems to work on my end.
D:\Projects\playground>python Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from importlib import invalidate_caches >>> invalidate_caches() >>> help(invalidate_caches) Help on function invalidate_caches in module importlib: invalidate_caches() Call the invalidate_caches() method on all meta path finders stored in sys.meta_path (where implemented). >>>
May-01-2017, 05:59 AM
No problem with Python 3.5.2
Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from importlib import invalidate_caches >>>
May-01-2017, 07:50 AM
[Image: h2ug_screen_shot_2017-05-01_at_12.17.27_pm.png][Image: gz3x_screen_shot_2017-05-01_at_12.14.35_pm.png]
Does it need to install special package?
Does it need to install special package?
May-01-2017, 08:05 AM
Is this issue raised by you?
May-01-2017, 08:36 AM
I get this with Python 2
~ ❯❯❯ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from importlib import invalidate_caches Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name invalidate_caches
May-01-2017, 08:55 AM
May-01-2017, 02:04 PM
You didn't happen to name one of your files "importlib.py", did you?
The error is saying that the file is found, but that the function doesn't exist within it. Since importlib is part of the standard library, maybe the file's being shadowed somewhere?
The error is saying that the file is found, but that the function doesn't exist within it. Since importlib is part of the standard library, maybe the file's being shadowed somewhere?
Pages: 1 2