jaegarmaster176
jaegarmaster176

Reputation: 27

ModuleNotFoundError: No module named 'display' in python

I have already installed 'display' module for python using the following code:

pip3 install display

However, when I try to import a module with the code given below,

from display import Displayable

I get the following error: ModuleNotFoundError: No module named 'display'

Any help will be greatly appreciated. Thanks.

Upvotes: 0

Views: 609

Answers (1)

Fishball Nooodles
Fishball Nooodles

Reputation: 511

This module is not widely used and does not have proper documentation. I suggest using pprint to display data nicely. Start by pip installing pprint:

Windows:

pip install pprint36

Mac:

pip3 install pprint36

Code

import pprint
stuff = [['apple', 'bannana'],'spam', 'eggs', 'lumberjack', 'knights', 'ni']
stuff.insert(0, stuff[:])
pp = pprint.PrettyPrinter(indent=4,compact=False)
pp.pprint(stuff)

From pprint docs

Upvotes: 1

Related Questions