aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Owen Campbell <[email protected]>2022-07-25 12:11:20 +0100
committerGravatar Owen Campbell <[email protected]>2022-07-25 12:11:20 +0100
commitd0219a132b2f64206a3c5eb381074f96bc7df97f (patch)
tree0fae2733678bf82edfecc05cc62d5f382034d4c5
parentMerge pull request #2224 from python-discord/sid/feature/tags/print-return (diff)
Add nomodule tag
-rw-r--r--bot/resources/tags/nomodule.md15
1 files changed, 15 insertions, 0 deletions
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 <your_package>
+```
+(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).