本文介绍了无法在Geany中使用Miniconda运行Python脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Puppy Wary 5.5,并且已将Miniconda安装在/root/miniconda2的文件夹中.我可以通过粘贴到终端窗口(urxvt)来运行python脚本

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随Geany一起提供,并且工作正常.如果我在Geany中有一个python脚本,然后按F5,将弹出一个新的控制台窗口,显示以下内容:

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:

,并在按回车键时中止.

and aborts on pressing return.

Geany在消息窗口中报告说它未能编译脚本.

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

bashrc文件包含一行

The bashrc file has the line

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

我如何让Geany运行python脚本?

How do I get Geany to run a python script?

推荐答案

Geany在使用F5或类似符号时未使用bashrc查找您的PYHOME.您有3种解决方法:

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

  1. 将设置放入.profile或通过桌面环境进行设置
  2. 调整构建->将构建命令设置为您的本地路径
  3. 在其中使用集成的VTE和bash.在VTE上的Edit-> Preferences-> Terminal
  4. 上设置执行程序
  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

但是,更笼统地说,您不应该以root用户身份运行图形界面或直接进行编码.在99.8%的情况下,这是一个糟糕的主意.

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.

这篇关于无法在Geany中使用Miniconda运行Python脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-12 15:27