wuub / SublimeREPL

SublimeREPL - run an interpreter inside ST2 (Clojure, CoffeeScript, F#, Groovy, Haskell, Lua, MozRepl, NodeJS, Python, R, Ruby, Scala, shell or configure one yourself)
https://github.com/wuub/SublimeREPL
Other
2.14k stars 312 forks source link

Using Python3 installed via pyenv with SublimeRepl #594

Open dahanbn opened 3 years ago

dahanbn commented 3 years ago

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.

FrCln commented 2 years ago

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.