Discussion:
unable to install packages into octave in Windows 7
ajiten
2017-05-10 12:06:33 UTC
Permalink
I am a complete beginner for programming.
I have installed octave 3.8.2 in Windows 7.
If I use the command, pkg install -forge io, then I get the error:

error: get_forge_pkg: could not read URL, please verify internet connection
error: called from:
error:
E:\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\private\get_forge_pkg.m at
line 76, column 7
error:
E:\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\private\get_forge_download.m
at line 26, column 12
error: E:\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\pkg.m at line 385,
column 29

As being a newbie, I tried to google out; & accordingly put values of
environment variables: http_proxy & http_port; although did not check if
there was already there some value beforehand. May be octave picks up
automatically values (cannot at least tell now!).
Anyway, the error persists with the same description.



--
View this message in context: http://octave.1599824.n4.nabble.com/unable-to-install-packages-into-octave-in-Windows-7-tp4683258.html
Sent from the Octave - General mailing list archive at Nabble.com.
Nicholas Jankowski
2017-05-10 14:38:29 UTC
Permalink
Post by ajiten
I am a complete beginner for programming.
I have installed octave 3.8.2 in Windows 7.
error: get_forge_pkg: could not read URL, please verify internet connection
E:\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\private\get_forge_pkg.m at
line 76, column 7
E:\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\private\
get_forge_download.m
at line 26, column 12
error: E:\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\pkg.m at line 385,
column 29
As being a newbie, I tried to google out; & accordingly put values of
environment variables: http_proxy & http_port; although did not check if
there was already there some value beforehand. May be octave picks up
automatically values (cannot at least tell now!).
Anyway, the error persists with the same description.
See: http://wiki.octave.org/Octave_for_Microsoft_Windows

Curious why you're using such an old version of Octave? Did you find some
place online that pointed you to this old version? The current version is
4.2.1, and the Windows version is available for both 32 and 64 bit from
here:
https://ftp.gnu.org/gnu/octave/windows/

There have been a number of changes since then, including security changes
that prevent older versions of the pkg command from automatically fetching
packages from the website.

If you need to use 3.8.2 for some reason, you need to manually download the
package file from https://octave.sourceforge.io/packages.php and then run:
pkg install packagename-1.2.3.tar.gz
ajiten
2017-05-11 13:52:28 UTC
Permalink
Thanks for your reply.
I had plan to install octave long back, but could not do it at that time &
just downloaded that version's file.
I feel by your answer that the two environment variables were not needed in
the first place, as you have stated : 'security changes that prevent older
versions of the pkg command from automatically fetching packages from the
website. '
--------
I have downloaded and installed the 4.2.1 version for 64 bit , and it is
cool in terms of package installation easily done after rebuild using
command: pkg rebuild . But, the web-page
(http://wiki.octave.org/Octave_for_Microsoft_Windows) still states that :

A bug in the Windows builds currently prevents Octave from automatically
retrieving packages from the website for installation or updates. This will
be fixed in the next Octave release. Until then, manual package installation
is necessary to update or install new packages on Windows.

---So, it means that the issue is still there and only the packaging has
solved the issue. If I need to download something in future, then I will
face the same issue presumably again!
So, the command : "pkg install -forge io" will not work again. I tried the
same, & octave after a long duration responded:
"For information about changes from previous versions of the io package, run
'news io'."
On running : "news io", the newest version is stated to be : io-2.4.7, while
mine is : io-2.4.5.
Is there any way available to upgrade rather than wait for the promised fix
in the next version.


Best regards.



--
View this message in context: http://octave.1599824.n4.nabble.com/unable-to-install-packages-into-octave-in-Windows-7-tp4683258p4683277.html
Sent from the Octave - General mailing list archive at Nabble.com.
Nicholas Jankowski
2017-05-11 19:15:04 UTC
Permalink
Post by ajiten
A bug in the Windows builds currently prevents Octave from automatically
retrieving packages from the website for installation or updates. This will
be fixed in the next Octave release. Until then, manual package installation
is necessary to update or install new packages on Windows.
Sorry, this appears to be a bit out of date. I think it was valid for
4.2.0, and someone just updated the numbers on the page to 4.2.1 without
noting that the bug was fixed in that version. Note that from some
discussion on the help list it seems the bug will still persist for anyone
running Windows XP.
Post by ajiten
---So, it means that the issue is still there and only the packaging has
solved the issue. If I need to download something in future, then I will
face the same issue presumably again!
So, the command : "pkg install -forge io" will not work again. I tried the
"For information about changes from previous versions of the io package, run
'news io'."
This should mean it downloaded and installed the latest version. I just
tried (using 4.2.1 on Windows 7) and it gave the same message.
Post by ajiten
On running : "news io", the newest version is stated to be : io-2.4.7, while
mine is : io-2.4.5.
what does
Post by ajiten
pkg list
say? I ran it and it gave the same message and upgraded me from 2.4.5 to
2.4.7
Nicholas Jankowski
2017-05-11 19:26:34 UTC
Permalink
Post by Nicholas Jankowski
Post by ajiten
A bug in the Windows builds currently prevents Octave from automatically
retrieving packages from the website for installation or updates. This will
be fixed in the next Octave release. Until then, manual package installation
is necessary to update or install new packages on Windows.
Sorry, this appears to be a bit out of date. I think it was valid for
4.2.0, and someone just updated the numbers on the page to 4.2.1 without
noting that the bug was fixed in that version. Note that from some
discussion on the help list it seems the bug will still persist for anyone
running Windows XP.
thanks for bringing this to our attention. I have updated the information
on the Wiki
ajiten
2017-05-12 02:09:32 UTC
Permalink
I should then be able to do the upgrade for a particular package, here io.
But the same is not achievable, as I stated in my earlier response.
Any reasons for the issue's persistence.




--
View this message in context: http://octave.1599824.n4.nabble.com/unable-to-install-packages-into-octave-in-Windows-7-tp4683258p4683297.html
Sent from the Octave - General mailing list archive at Nabble.com.
Nicholas Jankowski
2017-05-12 10:38:50 UTC
Permalink
(Oops, forwarding to the list)

On May 12, 2017 6:37 AM, "Nicholas Jankowski" <***@asme.org> wrote:

On May 11, 2017 10:22 PM, "ajiten" <***@yahoo.com> wrote:

I should then be able to do the upgrade for a particular package, here io.
But the same is not achievable, as I stated in my earlier response.
Any reasons for the issue's persistence.



Please copy and paste all output from:

pkg list

Then from:

pkg install -forge io

then again from:

pkg list

While you run the pkg install command, have your working directory open in
a separate explorer window so you can see if the package download file
appears there temporarily while it tries to install.

Report back with the outputs, maybe something will provide a clue.
ajiten
2017-05-12 11:50:39 UTC
Permalink
I followed your advice & got that there is a difference in the output of
command 'pkg install -forge io'. It gives a warning message now, before the
message on 2nd line (that I obtained on running this command for the first
time):
warning: (Automatic loading of spreadsheet I/O Java classlibs failed)
For information about changes from previous versions of the io package, run
'news io'.


The output of both ' pkg list ' & ' pkg install -forge io ' is shown in the
image below:

<Loading Image...>

Regarding the working directory, there is a small change of one additional
item being there (620 instead of 619) when the command is being run (it
takes a long time for the command to execute). However, to locate that
seemed unnecessary given the new line of warning being issued now.



--
View this message in context: http://octave.1599824.n4.nabble.com/unable-to-install-packages-into-octave-in-Windows-7-tp4683258p4683305.html
Sent from the Octave - General mailing list archive at Nabble.com.
Nicholas Jankowski
2017-05-12 13:23:47 UTC
Permalink
On May 12, 2017 8:03 AM, "ajiten" <***@yahoo.com> wrote:

I followed your advice & got that there is a difference in the output of
command 'pkg install -forge io'. It gives a warning message now, before the
message on 2nd line (that I obtained on running this command for the first
time):
warning: (Automatic loading of spreadsheet I/O Java classlibs failed)
For information about changes from previous versions of the io package, run
'news io'.


The output of both ' pkg list ' & ' pkg install -forge io ' is shown in the
image below:

<http://octave.1599824.n4.nabble.com/file/n4683305/pkg_
list_%3B_pkg_install_-forge_io.png>

Regarding the working directory, there is a small change of one additional
item being there (620 instead of 619) when the command is being run (it
takes a long time for the command to execute). However, to locate that
seemed unnecessary given the new line of warning being issued now.



That one file should be io-2.4.7.tar.gz (or whatever it's called) appearing
after having been successfully downloaded, then disappearing after install
is complete. So the automatic downloading appears to work. The pkg list
image also shows that io version 2.4.7 is installed. So pkg install works.

Some warnings during install is normal, for some packages, especially on
windows. This is unfortunate but is just the way the system works
sometimes. an error would be different as it would stop tge unstall. This
one could stem from the fact that you're reinstalling a package that has
already been successfully installed.

More importantly, does the package work? Load the package and try some of
the functions. (pkg load io)

Nick J.
ajiten
2017-05-12 13:53:54 UTC
Permalink
I am sorry that I did not notice the version update of the io package. But,
still the command ' pkg load io ' seems not to work. It gave warning:
warning: (Automatic loading of spreadsheet I/O Java classlibs failed)

I just exited & restarted octave again, then it works (means gives no
warning).
I request some more commands to check the working. This will improve my
understanding for future too.





--
View this message in context: http://octave.1599824.n4.nabble.com/unable-to-install-packages-into-octave-in-Windows-7-tp4683258p4683308.html
Sent from the Octave - General mailing list archive at Nabble.com.
Nicholas Jankowski
2017-05-12 15:21:56 UTC
Permalink
Post by ajiten
I am sorry that I did not notice the version update of the io package. But,
warning: (Automatic loading of spreadsheet I/O Java classlibs failed)
I just exited & restarted octave again, then it works (means gives no
warning).
I request some more commands to check the working. This will improve my
understanding for future too.
Ok, i think the IO package uses Java for some interfaces. Maybe something
before the restart made it unable to find Java.

The full function reference can be found here:
https://octave.sourceforge.io/io/

I think the thing most people want to do with this package is read/write
Excel files. If you have any .xls or xlsx files, you could try to read one
into Octave or to write a matrix out to a spreadsheet. There are also some
csv->cell functions you could try.

A very simple test script:

pkg load io
for idx1 = 1:10, for idx2 = 1:10, a{idx1,idx2} = eye(10)(idx1,idx2);
endfor, endfor
cell2csv('testout.csv',a)

should create a csv file with 0's and 1's.

xlswrite('testout.xlsx',a)

should create a similar file as an excel file.

TESTinput = xlsread('testout.xlsx')

should read the file back in and assign the array to a variable Testinput
Philip Nienhuis
2017-05-12 16:34:53 UTC
Permalink
On Fri, May 12, 2017 at 9:53 AM, ajiten &lt;
Post by ajiten
I am sorry that I did not notice the version update of the io package. But,
warning: (Automatic loading of spreadsheet I/O Java classlibs failed)
I just exited & restarted octave again, then it works (means gives no
warning).
I request some more commands to check the working. This will improve my
understanding for future too.
Ok, i think the IO package uses Java for some interfaces. Maybe something
before the restart made it unable to find Java.
https://octave.sourceforge.io/io/
I think the thing most people want to do with this package is read/write
Excel files. If you have any .xls or xlsx files, you could try to read one
into Octave or to write a matrix out to a spreadsheet. There are also some
csv->cell functions you could try.
pkg load io
for idx1 = 1:10, for idx2 = 1:10, a{idx1,idx2} = eye(10)(idx1,idx2);
endfor, endfor
cell2csv('testout.csv',a)
should create a csv file with 0's and 1's.
xlswrite('testout.xlsx',a)
should create a similar file as an excel file.
TESTinput = xlsread('testout.xlsx')
should read the file back in and assign the array to a variable Testinput
A better check would be to invoke the dedicated test script in the io
package:

test_spsh

that'll sort out the available interfaces (native (OCT), Java- and (on
Windows:) ActiveX based), runs basic tests for each interface found and
reports the results.

Philip



--
View this message in context: http://octave.1599824.n4.nabble.com/unable-to-install-packages-into-octave-in-Windows-7-tp4683258p4683316.html
Sent from the Octave - General mailing list archive at Nabble.com.
Loading...