colour
colour copied to clipboard
can not import Colour from colour (unknown location)
I can not import the most basic class and that is Color
from colour import Color Traceback (most recent call last): File "
", line 1, in ImportError: cannot import name 'Color' from 'colour' (unknown location)
this is in python3, and I am trying to run manim python code. How can I fix this?
Use from colour import Color
. ~Colour~Color
This doesn't work in the packages install with the following commands:
$ python3.8 -m pip install colour
$ python3.8 -m pip install git+https://github.com/vaab/colour@master
$ python3.8 -m pip install git+https://github.com/vaab/colour
Only after I cloned and installed from master did it work.
$ git clone https://github.com/vaab/colour.git
$ cd colour
$ python3.8 -m pip install -e .
then I could
$ python3.8
Python 3.8.11 (default, Jul 29 2021, 14:57:32)
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from colour import Color
>>> exit()
Curiously, they all have the same package version ==0.1.5
Actually, scratch that. The only reason that it worked was because I was cd'd into the colour/ directory and thus the Color.py module was in my Path. I think that the project structure must have gotten messed up somehow.