Can't run Python scripts with Miniconda in Geany

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 02:16:20

问题


Im using Puppy Wary 5.5 and I've installed Miniconda in a folder at /root/miniconda2. I can run python scripts by pasting into the terminal window (urxvt)

Wary5.5 comes with Geany and appears to work ok. If I have a python script in Geany and I press F5, a new console window pops up with:

./geany_run_script.sh: line 5: python: command not found (program exited with code: 127) Press return to continue

and aborts on pressing return.

In a message window Geany reports that it failed to compile the script.

The bashrc file has the line

export PATH="/root/miniconda2/bin":$PATH

How do I get Geany to run a python script?


回答1:


Geany is not using bashrc for finding your PYHOME when hitting F5 or similar. You got 3 ways solving it:

  1. Put your setting into .profile or set it via your desktop environment
  2. Adjust Build->Set Build Commands to your local path
  3. Make usage of integrated VTE and bash inside there. Set Execute Programs in VTE on Edit->Preferences->Terminal

However, more general, you shouldn't run a graphical interface or coding direct as root user. It's in 99.8% of cases a bad idea.



来源:https://stackoverflow.com/questions/36557575/cant-run-python-scripts-with-miniconda-in-geany

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!