-
Navigate/create directory (folder) where the project is

-
Create the python virtual environment

The command python -m venv .venv
is used:
-m
runs a specific Python module
venv
is the module for creating virtual environments
.venv
is the name of the directory for the environment
-
Activate python virtual environment

Inside the project directory (parent of .venv
), run:
. ./.venv/Scripts/activate
.
is shorthand for source
./
runs a script using a relative path
activate
is the script that starts the environment
- You’re in the virtual environment if you see
(.venv)
in your prompt
-
Using Python and Pip in a virtual environment
- Use
.venv/bin/pip
and .venv/bin/python
to use the environment's versions
-
Running the bot for the first time
-
Run the following commands inside the virtual environment:
.venv/bin/pip install httpx
.venv/bin/pip install discord
.venv/bin/pip install pyyaml
.venv/bin/pip install audioop-lts
.venv/bin/pip install apscheduler
-
If you get a "module not found" error, try installing that module with pip
.
-
Deactivating the virtual environment

-
Creating a server and bot account
No Comments