[英]Octave not recognizing installed packages
My newly installed Octave is not recognizing installed packages: 我新安装的Octave无法识别已安装的软件包:
>> pkg install -forge quaternion
For information about changes from previous versions of the quaternion package, run 'news quaternion'.
>> pkg list
no packages installed.
>>
I'm using Octave-4.0.3 on Windows 10. The install operation updates the appropriate files under c:\\Octave\\Octave-4.0.3\\share\\octave\\packages\\
and c:\\Octave\\Octave-4.0.3\\lib\\octave\\packages\\
. 我在Windows 10上使用Octave-4.0.3。安装操作将更新
c:\\Octave\\Octave-4.0.3\\share\\octave\\packages\\
和c:\\Octave\\Octave-4.0.3\\lib\\octave\\packages\\
下的相应文件c:\\Octave\\Octave-4.0.3\\lib\\octave\\packages\\
。 An install from local file (not using -forge
) produces the same results. 从本地文件安装(不使用
-forge
)会产生相同的结果。
What am I missing? 我想念什么?
This was a usage problem on my part. 这是我的使用问题。 I had defined a function called
load
which shadowed the built-in function of the same name and prevented pkg
from working correctly. 我定义了一个名为
load
函数,该函数遮盖了同名的内置函数,并阻止pkg
正常工作。
Unfortunately there is not a warning that a built-in is being shadowed as you add it, but I saw the warning when changing the current working directory away from and then back to the one where I had the function stored. 不幸的是,当您添加内置功能时,并没有发出警告,但是在将当前工作目录更改为存储该功能的当前工作目录之后,我看到了警告。 Tip for Octave beginners like me: Before you write a function with a generic name, check first if a function with that name already exists (eg with
help functionName
)! 给像我这样的Octave初学者的提示:在编写具有通用名称的函数之前,请首先检查具有该名称的功能是否已存在(例如,具有
help functionName
)!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.