Skip to content

`python` is Python 2 or cannot import SymPy

Source: Troubleshooting reference

Symptom: python --version reports 2.7, or python -c 'import sympy' fails after bootstrap.

Cause: The interactive Python environment or its entrypoint symlink is missing for the active PLAT. This commonly appears after moving between hosts with different CPU capability levels: another PLAT may have Python packages, but its binaries are intentionally not on this host’s PATH.

Fix: Re-run the Python installer for the active platform:

Terminal window
bash ~/dotfiles/install/python.sh
hash -r
python -c 'import sys, sympy; print(sys.version, sympy.__version__)'

The installer owns $LOCAL_PLAT/python and exposes its interpreter as $LOCAL_PLAT/bin/python; project-specific dependencies still belong in each project’s uv environment.