#๐ Colorama doesnt exist?
73 messages ยท Page 1 of 1 (latest)
@left sequoia
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
I downloaded the colorama module for python and I double clicked the setup.py. The screen flashed, but when I try to import the module, it always says
No Module named colorama
I copied and pasted...
i have done this...
q idk
which command are you using to run your program?
im using a host
Is that VSCode? If so you can see the Python interpreter being used in the bottom right
just press start button
no
free host
The error says that pip can't find a version suitable for the machine running your code
thats another error
tried installing platform
which doesnt exist
ignore that
if theres no way to fix this i can just delete the command that uses colorama
its not an issue
i ran pip freeze
aiosignal==1.3.1
altgraph==0.17.3
anyio==4.0.0
async-timeout==4.0.3
asyncio==3.4.3
attrs==23.1.0
auto-py-to-exe==2.39.0
beautifulsoup4==4.12.2
bottle==0.12.25
bottle-websocket==0.2.9
Brotli==1.1.0
bs4==0.0.1
capmonster-python==2.4.1
cartola==0.16
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.3
colorama==0.4.6
cryptography==41.0.5
customtkinter==5.2.0
darkdetect==0.8.0
DateTime==5.2
discord==2.3.2
discord.py==2.3.2
discum==1.4.1
easygui==0.98.3
EasyProcess==1.1
Eel==0.16.0
emoji==2.8.0
entrypoint2==1.1
exceptiongroup==1.1.3
fade==0.0.9
fernet==1.0.1
filetype==1.2.0
frozenlist==1.4.0
future==0.18.3
gevent==23.9.1
gevent-websocket==0.10.1
greenlet==3.0.0rc3
h11==0.14.0
httpcore==0.18.0
httpx==0.25.0
idna==3.4
keyboard==0.13.5
MouseInfo==0.1.3
mss==9.0.1
multidict==6.0.4
outcome==1.2.0
packaging==23.1
pbkdf2==1.3
pefile==2023.2.7
PIL-Tools==1.1.0
Pillow==10.0.0
psutil==5.9.6
pyaes==1.6.1
pyaesm==1.6.2
PyAutoGUI==0.9.54
pycparser==2.21
pycryptodome==3.18.0
pycryptodomex==3.19.0
pyfiglet==1.0.2
PyGetWindow==0.0.9
pyinstaller==5.13.2
pyinstaller-hooks-contrib==2023.8
pylibcheck==0.2.2
PyMsgBox==1.0.9
pyotp==2.9.0
pyparsing==3.1.1
pyperclip==1.8.2
pypiwin32==223
pypresence==4.3.0
PyRect==0.2.0
pyscreenshot==3.1
PyScreeze==0.1.29
PySocks==1.7.1
pystyle==2.9
python-dotenv==1.0.0
pytweening==1.0.7
pytz==2023.3.post1
pywin32==306
pywin32-ctypes==0.2.2
PyYAML==6.0
requests==2.31.0
requests-toolbelt==1.0.0
selenium==4.12.0
Sellix==1.0.1
six==1.16.0
sniffio==1.3.0
sortedcontainers==2.4.0
soupsieve==2.5
taskio==0.0.5
tasksio==0.0.0
threaded==4.1.0
tqdm==4.66.1
trio==0.22.2
trio-websocket==0.10.4
ua-parser==0.18.0
urllib3==2.0.4
vboxapi==1.0
webdriver-manager==4.0.0
websocket==0.2.1
websocket-client==0.59.0
whichcraft==0.6.1
wifi==0.3.8
winregistry==1.1.1
WMI==1.5.1
wsproto==1.2.0
yarl==1.9.2
zope.event==5.0
zope.interface==6.0
its there
When you press the run button do you get to see the command being used?
maybe just run python -V
if [[ -d .git ]] && [[ \"0\" == \"1\" ]]; then git pull; fi; if [[ ! -z \"\" ]]; then pip install -U --prefix .local ; fi; if [[ -f \/home\/container\/${REQUIREMENTS_FILE} ]]; then pip install -U --prefix .local -r ${REQUIREMENTS_FILE}; fi; \/usr\/local\/bin\/python \/home\/container\/main
Could you run /usr/local/bin/python -m pip freeze just to confirm?
i cant rlly run commands on the host's console
idk why
i run them on cmd
That's still fine - I think
it is
but i cant run this on cmd
this path isnt on my pc
its on the host's machine
So you were running the pip freeze command on your local machine's cmd?
on my computer
Oh, haha yeah that's not very useful here
I can't find any documentation on how to install packages for nexcord though, you could try installing rich as a replacement to colorama
It's not a drop-in replacement but you'd still be able to use rich's functions to color your output messages
i wanted to use Fore and Back
(Fore.YELLOW)
which needs colorama
The goal is to colour messages right? In rich you'd write it as rich.print(f"[yellow]Hi[/yellow]")
yeah
i guess
i wanted to make this:
prfx = (Back.BLACK + Fore.GREEN + time.strftime("%H:%M:%S UTC", time.gmtime()) + Back.RESET + Fore.WHITE + Style.BRIGHT)
print(prfx + " Logged in as " + Fore. YELLOW + client.user.name)
print(prfx + " Bot ID "+ Fore.YELLOW + str(bot.user.id))
print(prfx + " Discord Version " + Fore. YELLOW + discord.__version__)
print(prfx + " Python Version " + Fore. YELLOW + str(platform.python_version()))
Screw it ill just delete the colors
The output is possible to achieve using rich too, here is the documentation https://rich.readthedocs.io/en/stable/introduction.html
print(f"[bold green on black]{current_time}... [/] it will look something like this
the output is possible to achieve using no libraries too, just use ansi escape sequences, that's what colorama and rich do for you
They have extra features though, such as falling back to plaintext if the terminal doesn't support colour, etc etc
yeah
i got another problem
i send commands and they dont work
and there are no errors
!paste Could you paste the code? Remove your bot's token if present
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
A better way to manage your commands is to use extensions & cogs
i would do this rn
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.