SublimeREPL icon indicating copy to clipboard operation
SublimeREPL copied to clipboard

Using Python3 installed via pyenv with SublimeRepl

Open dahanbn opened this issue 4 years ago • 1 comments

Hi,

on my Mac I use Python 3.9.5 and it is installed via pyenv. In terminals and via PATH the python command uses and starts Python 3.9.5. The older Python 2.7 is shadowed and not directly accessible. Nevertheless the SublimeRepl Python still uses Python 2.7. As it seems somehow SublimeRepl launches an hardcoded path to python and did not use the entry where python points to.

➜ ~ which python /Users/dh/.pyenv/shims/python ➜ ~ python --version Python 3.9.5

Sublime Text uses Python 3.9.5 for building (running) the python files for both build targets (python & python3).

How can I use the system wide installed Python 3.9.5 for SublimeRepl?

version: ST4, Build4107, SublimeRepl from packagecontrol.io.

dahanbn avatar May 26 '21 10:05 dahanbn

You should specify which python to run in SublimeREPL settings. Go to Preferences -> Browse packages, then to SublimeREPL/config/Python and edit file Main.sublime-menu. There you should change "python" to "/Users/dh/.pyenv/shims/python". Note that this is not a python interpreter itself, but a script which runs correct python, specified by your pyenv.

FrCln avatar Dec 08 '21 17:12 FrCln