From d0219a132b2f64206a3c5eb381074f96bc7df97f Mon Sep 17 00:00:00 2001 From: Owen Campbell Date: Mon, 25 Jul 2022 12:11:20 +0100 Subject: Add nomodule tag --- bot/resources/tags/nomodule.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bot/resources/tags/nomodule.md diff --git a/bot/resources/tags/nomodule.md b/bot/resources/tags/nomodule.md new file mode 100644 index 000000000..12a6cf839 --- /dev/null +++ b/bot/resources/tags/nomodule.md @@ -0,0 +1,15 @@ +**ModuleNotFoundError** + +If you've installed a package but you're getting a ModuleNotFoundError, it's likely that the environment where your code is running is different from the one where you did the installation. + +You can read about Python environments at `!tags environments` and `!tags venv`. + +Common causes of this problem include: + +• You installed your package using `pip install ...`. It could be that the `pip` command is not pointing the the environment where your code runs. For greater control, you could instead run pip as a module within the python environment you specify: +``` +python -m pip install +``` +(You may have to specify the full path to the python executable). + +• Your editor/ide is configured to create virtual environments automatically (PyCharm is configured this way by default). -- cgit v1.2.3