Question:
How can I get rich to work properly
I have only been able to get it to work when doing pip install rich, but some things are missing and it has to reinstall rich on every run.
When trying to install rich through packages package operation fails.
Hello, @MiloCat. I believe the problem is with how you imported rich; you should do something like from rich.console import Console, from rich import print, from rich import pretty, and so on.
thanks, lol i just opened my tab at the moment you responded!
How can I import the library for hex code colors?
The weird thing is that rich is still reinstalled every time I run my repl. Also I still have this error:
Traceback (most recent call last):
File “main.py”, line 2, in
console.print(“DANGER!”, style=“red on white”)
AttributeError: module ‘rich.console’ has no attribute ‘print’
code:
from rich import console,style,print
console.print("DANGER!", style="red on white")
bruh errors:
ima invite you:
Errors with ur code:
Traceback (most recent call last):
File “main.py”, line 1, in
from rich import Console
ImportError: cannot import name ‘Console’ from ‘rich’ (/home/runner/RichTryout/venv/lib/python3.8/site-packages/rich/init.py)
Errors with that error fixed:
Traceback (most recent call last):
File “main.py”, line 3, in
console().print(“DANGER~”, style=“red on white”)
TypeError: ‘module’ object is not callable