import inspect error

Gary Herron gherron at digipen.edu
Mon Sep 17 05:13:28 EDT 2018


You appear to have a local file named keyword.py which is hiding a 
python installation file of the same name.


Gary Herron





On 09/17/2018 01:06 AM, jupiter.hce at gmail.com wrote:
> I have following errors running on Ubuntu 18, any insight how to fix it? Thank you.
>
> Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
> [GCC 7.3.0] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import inspect
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File "/usr/lib/python2.7/inspect.py", line 42, in <module>
>      from collections import namedtuple
>    File "/usr/lib/python2.7/collections.py", line 22, in <module>
>      from keyword import iskeyword as _iskeyword
>    File "keyword.py", line 3, in <module>
>      from inspect import currentframe, getframeinfo
> ImportError: cannot import name currentframe

-- 
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418




More information about the Python-list mailing list