如何在 Octave 中安装优化包?

How can I install Optimization package in Octave?

我尝试在 Octave 中安装 optim 包。

>> pkg install -forge optim
C:/PROGRA~1/GNU: line 1: [Paths]: command not found
C:/PROGRA~1/GNU: line 2: Octave/Octave-6.2.0/: No such file or directory
C:/PROGRA~1/GNU: line 3: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 4: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 5: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 6: OctaveOctave-6.2.0\binqt.conf: No such file or directory
C:/PROGRA~1/GNU: line 7: OctaveOctave-6.2.0\binqt.conf: No such file or directory
make: *** [Makefile:68: error-helpers.o] Error 127
make: Entering directory '/tmp/oct-jYpbYN/optim-1.6.1/src'
CXXFLAGS=" -Wall -Wno-deprecated-declarations" C:/PROGRA~1/GNU Octave/Octave-6.2.0/mingw64/bin/mkoctfile-6.2.0.exe -c error-helpers.cc
make: Leaving directory '/tmp/oct-jYpbYN/optim-1.6.1/src'

error: pkg: error running 'make' for the optim package.
error: called from
    configure_make at line 110 column 9
    install at line 196 column 7
    pkg at line 568 column 9
>>

这个问题是关于什么的?

在哪里可以找到文件 binqt.conf

这是一个已知错误。在这里阅读更多: bug #59412: [octave forge] (ocl) Compile package errors with spaces in path

A workaround 也被 Jinchuan 在该错误报告讨论中提出:

Since the alpha release of 6.0.90, I have encountered the following problems when I am trying to install a forge package on both win 7 and 10 64 bits systems... This problem can be solved by changing the default install location (e.g. C:\Program Files\GNU Octave\Octave-6.0.92) to a location without any blank space (I tried C:\Octave-6.0.92 and there is no problem while installing a forge package).