Can't run Python scripts with Miniconda in Gea

2019-09-10 08:21发布

问题:

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.