简体   繁体   中英

How to know what packages I already have downloaded in Octave?

I just installed Octave a few days ago and think I have been installing packages using the "pkg load name" function but never get a confirmation or anything that looks like the software is trying to download them. I also tried pkg install -forge package_name but that doesn't seem to work. Is there a difference between the two calls?

And; How can I know they are downloading? And where can I find a list of them that are?

The download function and automatic package installation in octave 4.2.1 is broken under windows. Nevertheless the standard packets come with the base installation. Just type
pkg list
in the octave console to display all installed packages. In my case the resulting list starts with these lines

Package Name         | Version | Installation directory
---------------------+---------+-----------------------
     communications  |   1.2.1 | C:\Octave\OCTAVE~1.1\share\octave\packages\communications-1.2.1
            control  |   3.0.0 | C:\Octave\OCTAVE~1.1\share\octave\packages\control-3.0.0
     data-smoothing  |   1.3.0 | C:\Octave\OCTAVE~1.1\share\octave\packages\data-smoothing-1.3.0
           database  |   2.4.2 | C:\Octave\OCTAVE~1.1\share\octave\packages\database-2.4.2
          dataframe  |   1.1.0 | C:\Octave\OCTAVE~1.1\share\octave\packages\dataframe-1.1.0
...

To get package information programmatically use

[dummy,info]=pkg('list');

info is a cell array of structures containing information about the packages. You can eg read the information about name and load state:

>> info{1}.name
ans = signal
>> info{1}.loaded
ans = 0

To get help about the package function enter help pgk on the command line. This help is currently (Octave 5.1) not included in the html documentation. That means doc help does NOT display this help page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM