twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
992 stars 61 forks source link

[FEATURE] Virtual Environment for Python #344

Open vladartym opened 2 months ago

vladartym commented 2 months ago

It would be nice to be able to create a virtual environment for example using pipenv to install and create packages just in obsidian

In the settings a little terminal window maybe that allows you to install plugins or even just setup a folder for where the virtual environment to live.

Please let me know if I overlooked something, or if this is even possible. Thanks 😊

twibiral commented 2 months ago

Hi, you can already use virtual environments - you just need to create them yourself and copy the link to your venv into the settings. You could even create and maintain the virtual environments that you use by using bash code blocks in a note.

But of course it would be easier to have a centrally managed option in the settings, so maybe we can implement it in the future.

vladartym commented 2 months ago

Great thanks for this! Would I just paste it in "python path"?

twibiral commented 2 months ago

Yes, exactly :) if you open the venv folder there should be some file could python.exe or something similar. Just copy the path to that file and it should work