I am trying to run octave in order to process netcdf files. While I am able to currently run octave successfully I have been having a very difficult time loading the package netcdf for octave.
I have used the command:
pkg -forge install netcdf
However when I type in:
pkg load netcdf
test netcdf
I get the following error message:
????? netcdf source code with tests for dynamically linked function not found
When I do a pkg list I get the following:
Package Name | Version | Installation directory
--------------+---------+-----------------------
netcdf *| 1.0.12 | /home/jsnyder/octave/netcdf-1.0.12
octcdf | 1.1.10 | /home/jsnyder/octave/octcdf-1.1.10
How do I resolve this issue?
Does anyone have specific instructions on how to successfully install netcdf so that it will work on octave? That includes where to get the netcdf files necessary for octave, how to successfully compile them, and then finally be able to successfully load into octave so that I can use this to process netcdf files.
These instructions have worked for me in the past:
sudo apt install netcdf-bin
sudo apt install liboctave-dev
sudo apt install libnetcdf-dev
in octave pkg install -forge netcdf
Then before using pkg load netcdf
Adding to Clinton's reply, I will recount the steps I took to installing it here, in the hope that it sheds some more light in the process of both installing and figuring out what to install in general in these situations.
I typed
pkg install netcdf -forge
in octave. Initially it complained with checking for nc-config... no
To find out which package provides this command, I ran in the linux terminal:
apt-file search nc-config
(note that if you don't have the apt-file tool you might need to install it first).
The output of the apt-file command informed me that this file is provided by the package libnetcdf-dev. So I installed this.
Retrying pkg install netcdf -forge worked the second time, and I can load the package successfully.
I also note that the second command you're trying to run is probably test_netcdf, NOT test netcdf. The former is a command included in the netcdf package, the latter is attempting to perform unit tests using the octave built-in testing syntax.
Doing test_netcdf seems to work fine for me after the above steps.
Related
I tried to install in Octave these packages:
bim
image
But setup is not finished, because this error:
Before starting to install packages, I updated the pkg itself with the command
pkg update
After a long update, everything also gives an installation error.
Also reinstalled Octave, the error does not disappear
I don't use Octave, but based on the instructions on https://octave.sourceforge.io/, you should try
pkg install -forge image
pkg install -forge bim
to install the Forge image and bim packages respectively.
I am trying to install libde265 from source but one of its dependencies is giving me problems. I also installed this depedency from source but I converted it to an rpm package before completing installation.
When I look for the location of this library I get:
$ whereis libvideogfx
libvideogfx: /usr/local/lib/libvideogfx.la /usr/local/lib/libvideogfx.a /usr/local/lib/libvideogfx.so
The flags I have added to the ./configure command such as LIBS are not working and I don't know the root of the problem.
I'm trying to install Pygame for python 3.5 32bit. I have learned that I can open the .whl files provided on the site by using the pip command. The problem is I've tried multiple ways doing this but with constant error.
python -m pip install pygame-1.9.2a0-cp35-none-win32.whl
'python' is not recognized as an internal or external command,
operable program or batch file.
The file I'm trying to install: pygame-1.9.2a0-cp35-none-win32.whl
My python program is located in my programs folder and everything else works fine.
You need to add python.exe to your Windows PATH variable.
The is the system variable that the operating system uses to locate the needed executables from the command line or Terminal windows. [1]
Actually there are many methods to set the PATH variable on windows. One way is to type
set PATH=%PATH%;location path of Python.exe
into the windows command-line interpreter (cmd):
set PATH=%PATH%;C:\Python35-32
Now -- before running the pip command -- you need to make sure that either
your working directory is set to the same folder where your pygame-1. ... in32.whl file is located
or
you supply the full absolute or relative path to the pip command.
Now you should be able to run your python -m pip command after restarting the cmd.exe.
if you get trouble when install pygame error about missing visual studio 10+. I have the answer: the problem is not about have or not have visual studio, because I try many version but it not work. The problem is file: between tar.gz and .whl so, this is the solution:
1) download file:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame go here and download your pygame version, notice about x64 or x86 and python version. my system is x64 and python is 3.4 so I choose: pygame-1.9.2a0-cp34-none-win_amd64.whl
2) put it in some where to install:
I put it in "C:", so open cmd: and type: cd C:\ (this changes the location to C:)
3) install
pip install C:\pygame-1.9.2a0-cp34-none-win_amd64.whl
done !
I installed latest Octave on Ubuntu 14.04 machine. However, when I tried to run imread command, it showed the following error message:
octave:12> imread('newfile.png')
error: imread: invalid image file: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error: /usr/share/octave/3.8.1/m/image/private/__imread__.m at line 181, column 7
error: /usr/share/octave/3.8.1/m/image/private/imageIO.m at line 66, column 26
error: /usr/share/octave/3.8.1/m/image/imread.m at line 107, column 30
Can someone please suggest how to solve it?
Thanks!
Following these steps worked for me [Author: Christoffer Cronström (hymyly)]:
Install the dev packages needed to build octave.
sudo apt-get build-dep octave
Get the official source package. Do this in a clean directory, because it will get polluted.
cd ~/some/suitable/directory
apt-get source octave
Build it. This took roughly an hour for me.
cd octave-3.8.2
dpkg-buildpackage
Either run it from the build directory:
./run-octave
...or most preferably install it over the official octave:
cd ..
sudo dpkg --install octave_3.8.2-4_amd64.deb
From: https://bugs.launchpad.net/ubuntu/+source/octave/+bug/1372202
How did you instal Octave? The error suggests that you're missing GraphicsMagick C++ interface (package libgraphicsmagick++3) but
if you installed Octave from Ubuntu's package manager you should not have had this problem; * if you compiled it yourself, Octave should have disabled imread completely and you'd have a very different error message.
So my guess is that you build it yourself, either with:
your own build of GraphicsMagick++ which are not being loaded anymore, you may need to add their path to the dynamic linker load path (either on /etc/ld.so.conf.d./graphicsmagick or define LD_LIBRARY_PATH);
the libraries from the package manager which you have since accidentally removed (since you did not install Octave from the repositories, your package manager will not know that libgraphicsmagick++ is installed for a reason).
Either way, the solution is easy. Install Octave from Ubuntu's package manager. One of the main reasons package managers exist is to avoid this type of problems, i.e., missing dependencies.
Today I have installed Octave 3.8 with GUI on my Windows 7 machine. Is there a command that will install all the available Octave packages ? Then I would also like to see a list of all the installed packages, and update them at times. So is there a command that checks for updates of all the installed packages ? Thank you.
It looks as if pkg update will update all your installed packages. See the documentation on pkg for more details.
I haven't found a way to install all packages, I am doing them one at a time using pkg install -forge <package_name>, which is a bit tedious. It is also giving me errors when trying to install parallel.
Load/Unload all packages at once by executing the following command
pkg load all
pkg unload all
On Windows/Mac there is an installer on http://octave.sourceforge.net/. This installs all(?) packages but you have to load them with "pkg load".