Changes

Jump to navigation Jump to search
2,163 bytes added ,  22:29, 4 January 2021
→‎Packages: update info for new v6.1 package behavior on windows
Line 21: Line 21:  
* note: users who have problems running .vbs files due to local security policy or software can instead make a shortcut to the {{Path|octave.bat}} file located in {{Path|\mingw32\bin}} or {{Path|\mingw64\bin}}, depending on the version of Octave installed.  
 
* note: users who have problems running .vbs files due to local security policy or software can instead make a shortcut to the {{Path|octave.bat}} file located in {{Path|\mingw32\bin}} or {{Path|\mingw64\bin}}, depending on the version of Octave installed.  
   −
==Packages==
+
==Octave Packages==
 +
Like many software programs, Octave uses ''packages'' to optionally extend and modify its capability without changing core Octave behavior. These packages can be installed and loaded using the built in package management program 'pkg'.  (Note that Octave does not automatically load installed packages, they must be manually loaded from within Octave by the user.)
   −
A selection of pre-built, [[Octave Forge]] packages is included with for all versions of the official Windows release.  If you followed the installation directions above, you can display a list of all installed packages by typing the command below at the Octave command prompt:
+
Octave maintains a system-wide (or ''global'') package list, and a user-specific (or ''local'') package list. By default in Windows 10, local packages are located at {{Path|C:\Users\%USERNAME%\octave\}}.  (The \octave folder will be created during the first package install if it is not already present.)  The global packages are stored in {{Path|%OCTAVE_HOME%\mingw64\share\octave\packages\}}. Specific locations on your system can be found by typing the following commands at the Octave command line:
 +
 
 +
    >> pkg local_list
 +
    >> pkg global_list
 +
 
 +
Octave versions for Windows prior to 6.1.0 defaulted to always using and making changes to global packages.  The default is now to follow the same behavior on all platforms, and for all package updates and installations to apply to the user's local package list in the user's home folder unless otherwise specified.
 +
 
 +
===Pre-installed Packages===
 +
 
 +
A selection of pre-built, [[Octave Forge]] packages is included with all versions of the official Windows release.  If you followed the installation directions above, you can display a list of packages by typing the command below at the Octave command prompt:
    
   >> pkg list
 
   >> pkg list
   −
The output for packages included in version {{Release}} installed into {{Path|C:\Octave}} is:
+
The output for preinstalled global packages included with version 6.1.0 installed into {{Path|C:\Octave}} is:
 
                                                                                              
 
                                                                                              
 
     Package Name        | Version | Installation directory
 
     Package Name        | Version | Installation directory
Line 79: Line 89:  
                 zeromq  |  1.5.2 | C:\Octave\octave-6.1.0-w64\mingw64\share\octave\packages\zeromq-1.5.2
 
                 zeromq  |  1.5.2 | C:\Octave\octave-6.1.0-w64\mingw64\share\octave\packages\zeromq-1.5.2
    +
Note that the included packages shown above are stored in the default ''global package location''. 
    
If Octave was installed from a zip or 7z archive and you did not run the {{Path|post-install.bat}} file, you may not see any packages listed.  In that case you need to run:
 
If Octave was installed from a zip or 7z archive and you did not run the {{Path|post-install.bat}} file, you may not see any packages listed.  In that case you need to run:
 
    
 
    
 
   >> pkg rebuild
 
   >> pkg rebuild
 +
 +
That will force octave to look for both ''local'' and ''global'' packages in the set locations to repopulate list of available packages.  Note that  'local' packages take precedence if present in both locations.
 +
 +
===Package Installation and Update===
    
All packages can be updated to the latest version by running:
 
All packages can be updated to the latest version by running:
Line 90: Line 105:  
Other packages can be installed by running:
 
Other packages can be installed by running:
   −
   >> pkg install -forge <package name>
+
   >> pkg install -forge <package_name>
    
To install a new or updated package version manually, the package file can be downloaded from the [https://octave.sourceforge.io/packages.php Octave Forge website] to the working directory and can be installed using:
 
To install a new or updated package version manually, the package file can be downloaded from the [https://octave.sourceforge.io/packages.php Octave Forge website] to the working directory and can be installed using:
    
   >> pkg install package_file_name.tar.gz
 
   >> pkg install package_file_name.tar.gz
 +
 +
Note that all of the commands above will perform ''local'' package installs.  E.g., if an update is found for a global package, the updated version will be installed to the ''local'' package location, leaving the old version intact in the ''global'' package location.  This behavior can be changed by calling the install command with the {{Path|-global}} option. For example:
 +
 +
To update all global packages to the latest version, use:
 +
 +
  >> pkg update -global
 +
 +
or for one specific package:
 +
 +
  >> pkg install -forge -global <package_name>
    
Detailed instructions for installing individual Octave Forge packages are given at https://octave.sourceforge.io/packages.php.
 
Detailed instructions for installing individual Octave Forge packages are given at https://octave.sourceforge.io/packages.php.
110

edits

Navigation menu