Skip to content

how to use snoop for python 2.7 #69

@sant527

Description

@sant527

I am getting the below error when using snoop. when trying to run in python 2.7

how to use snoop for python 2.7

  File "/home/hadoop/./driver.py", line 1, in <module>
    import snoop
  File "/usr/local/lib/python2.7/site-packages/snoop/__init__.py", line 19, in <module>
    from .configuration import Config, install
  File "/usr/local/lib/python2.7/site-packages/snoop/configuration.py", line 11, in <module>
    from snoop.formatting import DefaultFormatter
  File "/usr/local/lib/python2.7/site-packages/snoop/formatting.py", line 8, in <module>
    import executing
  File "/usr/local/lib/python2.7/site-packages/executing/__init__.py", line 12, in <module>
    from .executing import Source, Executing, only, NotOneValueFound, cache, future_flags
  File "/usr/local/lib/python2.7/site-packages/executing/executing.py", line 36, in <module>
    from functools import lru_cache
ImportError: cannot import name lru_cache
$ pip show snoop
Name: snoop
Version: 0.4.3
Summary: Powerful debugging tools for Python
Home-page: https://github.com/alexmojaki/snoop
Author: Alex Hall
Author-email: alex.mojaki@gmail.com
License: MIT
Location: /usr/local/lib/python2.7/site-packages
Requires: cheap-repr, asttokens, backports.functools-lru-cache, six, pygments, executing
You are using pip version 9.0.3, however version 24.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
python --version
Python 2.7.18

pip -V
pip 9.0.3 from /usr/lib/python2.7/dist-packages (python 2.7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions