3

Can anyone explain to me how to import the Python colors? This is for a programming assignment, but I'm stuck here and can't find tutorials online.

I tried from livewires import games, color

File "/Users/username/Desktop/Programming100/PhysicsLab/PhysicsCsLab.py", line 2, in <module>
ImportError: No module named livewires

I wanted to color shapes such as ellipse, rect, etc., but I don't know how that can be made possible.

Edit: I don't know if this matters or not, but I'm using CALICO.

HowbeitGirl
  • 591
  • 3
  • 12
  • 21

3 Answers3

4

This just means that you haven't installed the package. Or you have installed it, but the python interpreter you're using the run the script does not does not have it installed. This can often happen when pip is defined for one python interpreter in particular.

If you have not installed it then you can do so using:

pip install livewires

If that does not help, you're going to go into your interpreter's location, go into Scripts and then use pip install livewires.

Games Brainiac
  • 80,178
  • 33
  • 141
  • 199
2

You don't have the python's package named livewires. You can install it via pip like so: pip install livewires.

aga
  • 27,954
  • 13
  • 86
  • 121
1

Do you mean terminal colors ? You can try colorma - https://pypi.python.org/pypi/colorama and it works great! I am not sure how will you draw shapes though. You can try using curses - http://docs.python.org/2/library/curses.html

Arovit
  • 3,579
  • 5
  • 20
  • 24