If you encounter the following error when running your automation:
ModuleNotFoundError: No module named 'botcity' The IDE (e.g., PyCharm, VSCode) automatically creates a virtual environment for your project.
Dependencies are installed inside this virtual environment.
The script is executed using the system-wide (global) Python interpreter, rather than the virtual environment.
In this case, the global Python environment does not have access to the packages (like botcity), resulting in the ModuleNotFoundError.
Make sure the same Python interpreter is used to install dependencies and to run the automation.
If you're using a virtual environment, ensure it is activated before executing any commands.
Using the correct environment or interpreter, run:
pip install --upgrade -r requirements.txt
This will install (or update) all required dependencies as listed in your project’s requirements.txt file.
Always execute your automation using the same Python environment in which the dependencies were installed.
If you’re running your automation with BotCity Runner and encounter similar errors for other libraries, make sure:
The missing module is correctly listed in the requirements.txt file of your automation.
BotCity Runner relies on this file to install all necessary packages during task execution.
The ModuleNotFoundError is usually caused by a mismatch between the environment where dependencies were installed and the one used to execute the automation. Ensuring consistency between these environments is key to resolving this issue.