Hey,
I got a Discord bot written in python. I'm mostly using Interactions.py framework.
My code works if I have activated virtual envirovement, but deactivated I can't even download the library, in virtual envirovement I can.
This is a problem because I need to host my bot in cloud and when I uploaded my code and dependecies I get an error "ModuleNotFoundError: No module named 'interactions'". I get this same error on my own desktop computer when I don't have virtual envirovment activated.
I tried to install the Interactions library outside of the virtual envirovment and I get this error traceback:
[pc@archlinux bee]$ python3 -m pip install discord-py-interactions --upgrade
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
python-xyz', where xyz is the package you are trying to
install.
If you wish to install a non-Arch-packaged Python package,
create a virtual environment using 'python -m venv path/to/venv'.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.
If you wish to install a non-Arch packaged Python application,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. Make sure you have python-pipx
installed via pacman.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
[pc@archlinux bee]$
and here is my dependencies gotten from "pip freeze > requirements.txt"
aiohttp==3.9.1
aiosignal==1.3.1
attrs==23.2.0
discord-py-interactions==5.11.0
discord-typings==0.7.0
discord.py==2.3.2
emoji==2.9.0
frozenlist==1.4.1
idna==3.6
multidict==6.0.4
tomli==2.0.1
typing_extensions==4.9.0
yarl==1.9.4