Find your Python executable
The Jupyter for Obsidian plugin works by starting a Jupyter instance for you, automatically, instead of you going to your terminal and starting it manually.
While it provides a smoother experience once set up, it requires that the plugin knows which Python executable to use. This can be configured in the plugin's settings using Python executable to use and, for Python environments, Python executable path.
This guide aims at helping you to find out what your Python executable is, and configure the plugin accordingly.
Generic Guide
The simplest way to find your Python executable is:
Open a new terminal
Start Jupyter (either Jupyter Lab or Jupyter Notebook is fine) from that terminal, manually. This generally means activating an environment if you are using one, and running a command such as
bashjupyteror
bashpython -m jupyterlabEnsure Jupyter is able to start, then stop it.
Still in the same terminal, run the following command:
bashpython -c "import sys; print(sys.executable)"TIP
If the command fails with a message such as
python: command not foundtry replacing
pythonwithpython3.This will run a super-short Python script whose sole purpose is to print the Python executable's path.
You will get a path printed in the terminal. Some examples of what it might look like include:
C:\Users\<username>\AppData\Local\Programs\Python\Python3x\python.exe /usr/bin/python3 /home/<username>/some/directory/.venv/bin/python /Users/<username>/anaconda/bin/pythonCopy this path, we will use it in the following steps.
Open the settings of the Jupyter for Obsidian plugin.
In the Python section, set the Python executable to use setting to the value
Specified executable path.Still in the Python section, paste the path from before into the Python executable path setting.
Restart the Jupyter environment from within Obsidian if needed.
The plugin should now be using the specified Python executable/environment to run Jupyter. If something is still not working, please refer to the troubleshooting guide or open a ticket directly.
Using Conda or Miniconda
If you are using Conda or Miniconda to manage the Python environment where Jupyter is installed, a second method to find your Python executable path is to follow the instructions in their documentation, though the generic guide should also work fine.
Find the Python executable path of the Conda environment using the instructions provided by the Anaconda documentation and copy the executable path that it gives you.
Open the settings of the Jupyter for Obsidian plugin.
In the Python section, set the Python executable to use setting to the value
Specified executable path.Still in the Python section, paste the path from before into the Python executable path setting.
Restart the Jupyter environment from within Obsidian if needed.
And voilà! The plugin should now be able to run Jupyter from your Conda or Miniconda environment.
If you encounter any problem, please refer to the troubleshooting guide or open a ticket directly.
