twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
1.09k stars 66 forks source link

Python code block unable to import system-wide installed modules. #330

Open Mariner10 opened 8 months ago

Mariner10 commented 8 months ago

Pretty self explanatory, I can run my own .py files with various modules imported however when they are ran inside obsidian it is unable to import those modules. Things like datetime and time work fine however, as they are bundled with python. My goal here is to use matplotlib to generate graphs within my notes.

I am using "python3" as my path, as "python" does not work. I am running macOS 14.0

Any ideas as to why this could be happening and how to resolve it?

twibiral commented 8 months ago

There are some problems dependent on way you installed obsidian. Most times brew seems to be the problem, for example see #87

Please tell me if this is helpful or not for you

kernsando commented 6 months ago

I'm having a similar problem however when I run my python code the output reads invalid syntax (, line 1).

My path is /opt/anaconda3/bin/python3