Sublime Forum

Using Python3 installed via pyenv with SublimeRepl

#1

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?

ST4, Build4107

0 Likes

#2

I suggest you open an issue on the GitHub repo of SublimeREPL, or contribute your findings to an existing open issue https://github.com/wuub/SublimeREPL

1 Like

#3

I did so. But I am afraid that the package might be dead. Last commit was 6 years ago and there are year old pull requests waiting.

As it seems SublimeRepl, as a TOP25 package, with more than 1 million downloads might share the faith as some other Sublime Text packages, no active maintenance.

0 Likes

#4

I would suggest you look into the Terminus package as a replacement then.

1 Like

#5

As an additional resource on how you can use Terminus as a potential alternative for SublimeREPL

1 Like

#6

Thanks, that seems like a good idea. My plan for this evening was to look for some good video explanation of Terence @OdatNurd regarding Python and ST. :slight_smile:

0 Likes

#7

After experiminting with Terminus I have interactive builds with Terminus and Origami thanks to Terence (@OdatNurd). :slight_smile:

The problem with Sublime Repl came from my environment settins on MacOs.

I needed to add the following settings to .profile and .zprofile. Now Sublime Repl uses the new Python version as well.

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval “$(pyenv init --path)”

1 Like