如何在Octave中永久加载软件包? [英] How to load packages in Octave permanently?

查看:551
本文介绍了如何在Octave中永久加载软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Window Vista上使用Octave.我在代码中使用了4包.但是每次我重新启动八度时,我都必须从命令行"pkg load ..."中手动加载. 有没有一种方法可以永久加载它们,以便每当Octave启动时,它都会在其路径中找到它们.

I am using Octave on Window vista. I am using 4 package in my code. But every time I restart octave, I have to load manually from command line, 'pkg load ...' Is there a way to load them permanently so that whenever Octave is started it finds them in its path.

推荐答案

八度启动时,它将运行~/.octaverc.如果您希望Octave自动加载程序包,只需向其中添加pkg load pkg-name命令.如果文件不存在,请创建它.

When Octave starts, it runs ~/.octaverc. If you want Octave to automatically load a package, simply add a pkg load pkg-name command to it. If the files does not exist, create it.

如果执行此操作,请记住其他人可能没有配置Octave在启动时加载程序包.因此,如果您为其他人编写代码,请记住您的程序仍然需要加载他们所需的程序包.

If you do this, remember that other people may not have Octave configured to load packages at startup. Therefore, if you write code for others, remember that your programs still need to load the packages they require.

不要使用pkg install -auto ...pkg rebuild -auto ..,因为这将在下一个Octave版本中停止工作.

Do not use pkg install -auto ... or pkg rebuild -auto .. because that will stop working on the next Octave release.

这篇关于如何在Octave中永久加载软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆