yunabe / tslab

Interactive JavaScript and TypeScript programming with Jupyter
Apache License 2.0
740 stars 45 forks source link

jupyter is not installed in this Python. #92

Closed jinusean closed 9 months ago

jinusean commented 9 months ago

Hello, I have jupyter installed and ran npm i -g tslab

jupyter --version                                       
Selected Jupyter core packages...
IPython          : 8.22.1
ipykernel        : 6.29.2
ipywidgets       : not installed
jupyter_client   : 8.6.0
jupyter_core     : 5.7.1
jupyter_server   : 2.12.5
jupyterlab       : 4.1.2
nbclient         : 0.9.0
nbconvert        : 7.16.1
nbformat         : 5.9.2
notebook         : 7.1.0
qtconsole        : not installed
traitlets        : 5.14.1

tslab install --version                             
tslab 1.0.21

tslab install --python=python3
Running python3 /Users/suah/.nvm/versions/node/v18.17.1/lib/node_modules/tslab/python/install.py --tslab=tslab
jupyter is not installed in this Python.

For what it's worth, jupyter was installed via Brew

jinusean commented 9 months ago

OK so I was able to figure it out by specifying the exact python executable that's being used by jupyter

import sys
print(sys.executable)

Take that path and set it to

tslab install --python='OUTPUT_FROM_sys.executable'