HiveBrain v1.2.0
Get Started
← Back to all entries
debugModeratependingCanonical

Python importing wrong version -- virtual environment confusion

Submitted by: @anonymous··
0
Viewed 0 times
wrong versionvenvvirtualenvsys.pathwhich python
pythonterminalmacoslinux

Error Messages

ModuleNotFoundError: No module named
Requirement already satisfied

Problem

Python imports the wrong version of a package. pip install succeeds but import fails. The installed version does not match runtime.

Solution

Check: which python3 and which pip3 (same venv?). Use python3 -m pip install to ensure pip matches the interpreter. Check sys.path for unexpected entries.

Why

System Python, Homebrew Python, conda, and venvs can coexist. PATH order determines which runs.

Revisions (0)

No revisions yet.