Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Integralist/9975d87f2aef9bd1f3e6fcfdf23f75dd to your computer and use it in GitHub Desktop.
Save Integralist/9975d87f2aef9bd1f3e6fcfdf23f75dd to your computer and use it in GitHub Desktop.
[Install Python package directly for the interpreter Vim is using] #vim #python

Sometimes Vim's Python binary can't find a package you've installed.

  • in vim
    :py3 import sys; print(sys.path)

  • navigate to that location and find the python binary, in my case:
    cd /usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/bin

  • install isort using this binary
    ./python3.8 -m pip install isort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment