euporie icon indicating copy to clipboard operation
euporie copied to clipboard

Select local .venv

Open maedmatt opened this issue 3 weeks ago • 4 comments

Hello,

I see that there's the option to select "Local Python" but then how can you select the right one? Which in my case is the one in the folder with the jupyter notebook.

Also would it be possible to add relative numbers?

Thanks for the help!

maedmatt avatar Dec 07 '25 17:12 maedmatt

Another issue I have is that euporie is not working inside a tmux session

maedmatt avatar Dec 08 '25 14:12 maedmatt

Hi,

  1. I'd reccomend installing ipykernel inside your virtual environment:

    uv pip install ipykernel
    

    then registering the kernel:

    uv run python -m ipykernel install --user --name=my-kernel
    

    and selecting that kernel in euporie.

    The local-python kernel uses the same Python environment that euporie is running in, so if you really want to use it just install euporie in your virtual environment and run it from there:

    uv run --with euporie euporie-notebook
    

  1. Do you mean relative line numbering? I think that should be possible.

  1. Can you give me some more detail about what happens when you try to run euporie in tmux? It runs fine for me in tmux, so I'll need a bit more information than "it's not working" to be able to help
    • Please describe what actually happens when you try to run it
    • What error messages do you get, if any?
    • Can you share your tmux configuration?
    • Can you share the debug log output from euporie? (Run euporie using euporie-notebook --log-level=debug --log-file=log.log)

joouha avatar Dec 08 '25 19:12 joouha

Hey @joouha,

Yes, sorry for the low quality of my statements, I will try to be more precise now:

  1. Local Python (SOLVED): If I want to run my notebook with a local .venv I have to use this command: uv run --with euporie euporie-notebook notebook.ipynb

  1. Yes, since one of the reason why I want to use euporie is that it runs in the terminal, I was wondering if it was possible to bring it as close as possible to a "vim like" experience. So relative line numbers would be great (plus global number for current line)

  1. When I try to open euporie inside a tmux session it get's way slower (a lot of the times I'm stuck at select the kernel option)

In this case I can see it is stuck at rendering 36%

Those are the associated logs:

2025-12-08 22:04:54.622 INFO [euporie.core.app.app.open_file:665] Opening file TP1_LQR.ipynb 2025-12-08 22:04:54.623 DEBUG [euporie.core.app.app.get_file_tabs:598] File TP1_LQR.ipynb has mime type: application/x-ipynb+json 2025-12-08 22:04:55.038 DEBUG [euporie.core.kernel.jupyter.start:334] Imported ipykernel to prevent import deadlock 2025-12-08 22:04:55.038 DEBUG [euporie.core.kernel.jupyter.start_async:213] Starting kernel 2025-12-08 22:04:55.066 INFO [euporie.core.kernel.jupyter.start_async:254] Started kernel python3 2025-12-08 22:04:55.067 DEBUG [euporie.core.kernel.jupyter.post_start:284] Waiting for kernel to become ready 2025-12-08 22:04:55.121 DEBUG [euporie.core.convert.datum.convert_async:286] Conversion step Converter(func=<function latex_to_png_py_mpl at 0x109c8f270>, filter_=Condition(functools.partial(<function have_modules..try_import at 0x109c8eda0>, 'matplotlib')), weight=1) failed Traceback (most recent call last): File "/Users/matteo/.cache/uv/archive-v0/VLVXjtJGAPrGyYFn8HhM6/lib/python3.14/site-packages/euporie/core/convert/datum.py", line 281, in convert_async output = await converter.func( ^^^^^^^^^^^^^^^^^^^^^ datum, cols, rows, fg, bg, **kwargs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/Users/matteo/.cache/uv/archive-v0/VLVXjtJGAPrGyYFn8HhM6/lib/python3.14/site-packages/euporie/core/convert/formats/png.py", line 135, in latex_to_png_py_mpl width, height, depth, _, _ = parser.parse(data, dpi=72, prop=prop) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/matteo/Documents/02 Areas/4. University/Sorbonne University/SensoriMotor/2) Sensori-Motor Systems/TP1/.venv/lib/python3.14/site-packages/matplotlib/mathtext.py", line 86, in parse return self._parse_cached(s, dpi, prop, antialiased, load_glyph_flags) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/matteo/Documents/02 Areas/4. University/Sorbonne University/SensoriMotor/2) Sensori-Motor Systems/TP1/.venv/lib/python3.14/site-packages/matplotlib/mathtext.py", line 100, in _parse_cached box = self._parser.parse(s, fontset, fontsize, dpi) File "/Users/matteo/Documents/02 Areas/4. University/Sorbonne University/SensoriMotor/2) Sensori-Motor Systems/TP1/.venv/lib/python3.14/site-packages/matplotlib/_mathtext.py", line 2167, in parse raise ValueError("\n" + ParseException.explain(err, 0)) from None ValueError: \dot{x} = \begin{bmatrix} 0 & 1 \ 0 & -b/I \end{bmatrix} x + \begin{bmatrix} 0 \ 1/I \end{bmatrix} u ^ ParseFatalException: Unknown symbol: \begin, found '' (at char 10), (line:1, col:11) 2025-12-08 22:04:55.123 WARNING [euporie.core.convert.datum.convert_async:295] An error occurred during format conversion 2025-12-08 22:04:55.123 ERROR [euporie.core.convert.datum.convert_async:298] Failed to convert Datum(format='latex') to png using route ['latex', 'png'] at stage png 2025-12-08 22:04:55.154 INFO [euporie.core.lsp.log_message:1027] Pyright language server 1.1.405 starting 2025-12-08 22:04:55.154 INFO [euporie.core.lsp.log_message:1027] Server root directory: file:///opt/homebrew/lib/node_modules/pyright/dist 2025-12-08 22:04:55.206 INFO [euporie.core.lsp.log_message:1027] basedpyright language server 1.33.0 starting 2025-12-08 22:04:55.206 INFO [euporie.core.lsp.log_message:1027] Server root directory: file:///Users/matteo/.local/share/uv/tools/basedpyright/lib/python3.14/site-packages/basedpyright/dist 2025-12-08 22:04:55.356 INFO [euporie.core.lsp.log_message:1027] Starting service instance "" 2025-12-08 22:04:55.357 INFO [euporie.core.lsp.log_message:1027] No include entries specified; assuming / 2025-12-08 22:04:55.357 INFO [euporie.core.lsp.log_message:1027] Auto-excluding **/node_modules 2025-12-08 22:04:55.357 INFO [euporie.core.lsp.log_message:1027] Auto-excluding **/pycache 2025-12-08 22:04:55.357 INFO [euporie.core.lsp.log_message:1027] Auto-excluding */. 2025-12-08 22:04:55.357 INFO [euporie.core.lsp.log_message:1027] Assuming Python version 3.14.0.final.0 2025-12-08 22:04:55.853 WARNING [euporie.core.lsp.log_message:1027] File or directory "/" does not exist. 2025-12-08 22:04:55.859 INFO [euporie.core.lsp.log_message:1027] No source files found. 2025-12-08 22:04:55.952 DEBUG [euporie.core.kernel.jupyter.post_start:292] Kernel 3e1180db-990d-40b9-8b88-f92c917a3cd6 ready 2025-12-08 22:04:55.996 DEBUG [euporie.core.kernel.jupyter.poll:347] Waiting for shell messages 2025-12-08 22:04:56.002 DEBUG [euporie.core.kernel.jupyter.poll:347] Waiting for iopub messages 2025-12-08 22:04:56.008 DEBUG [euporie.core.kernel.jupyter.poll:347] Waiting for stdin messages 2025-12-08 22:04:56.046 DEBUG [euporie.core.tabs.kernel.kernel_started:315] Running 0 kernel tasks

maedmatt avatar Dec 08 '25 21:12 maedmatt

I've added a new option to enable relative line numbers called relative_line_numbers.

Thanks for sharing the debug log - I'll look into the tmux issue. Does the problem occur when opening a blank notebook, or only the TP1_LQR.ipynb file mentioned?

joouha avatar Dec 11 '25 16:12 joouha

@joouha thanks for the addition!

Yes, I've tried with other notebooks and I get the same problem (rendering get stuck) and I'm not able to use the notebook anymore, forcing me to quit the terminal.

maedmatt avatar Dec 12 '25 15:12 maedmatt