Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Append new pythonpath permanently in Geany IDE

How can I add a new pythonpath in Geany? Is something in the preferences/options that I'm missing? I tried adding this in .bashrc , but it didn't work.

export PYTHONPATH=/mypath

What I do now is to add these two lines in the top of every script, but it's not good as a permanent solution:

import sys
sys.path.append('mypath')
like image 485
kalfasyan Avatar asked May 03 '26 01:05

kalfasyan


2 Answers

Add export PYTHONPATH=$PYTHONPATH:/mypath to /etc/profile and reboot.

That should work for you.

like image 77
Padraic Cunningham Avatar answered May 07 '26 10:05

Padraic Cunningham


You can also do it without modifying any system configuration.

In Geany go to Edit > Preferences > Tools

Terminal field should say something like:

x-terminal-emulator -e "/bin/sh %c"

Change it to:

x-terminal-emulator -e "env PYTHONPATH=/mypath /bin/sh %c"
like image 22
arekolek Avatar answered May 07 '26 09:05

arekolek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!