Hi all,
I tried follow the example for API phyton in a MacBook of this web site http://www.ahay.org/wiki/Guide_to_madagascar_API
and I have the error:
scons: Reading SConscript files ...
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
AttributeError: 'Input' object has no attribute 'read':
File "/Users/diego/Documents/PhD/tesis/experimentos_num/camdas_inclinadas_quali/teste/SConstruct", line 9:
input.read(data)
####################################################
Before, I installed the libraries swig and numpy, following another post in this forum. I'm sure that the libraries was installed, but I dont know whats is the problem.
Thank you,
Diego
It looks like the problem is not with Madagascar API but with numpy (the first RuntimeError).
Please run python and make sure that you can run
import c_m8r
import numpy
I have the same problem with python API, I am using Ubuntu
the following code gives an error :
import numpy, rsf.api
input = rsf.api.Input('test.rsf')
n1 = input.int("n1")
n2 = input.int("n2")
data = numpy.zeros((n2,n1),'f')
input.read(data)
AttributeError: 'Input' object has no attribute 'read':
it seems that the problem is with c_m8r because when I type
import c_m8r
I get this error messege
ImportError: No module named c_m8r
How can I resolve this problem?
Thank you
To install c_m8r, you need SWIG http://www.swig.org/
After installing SWIG, run Madagascar's configure script and make sure that $RSFSRC/config.py has SWIG defined.
I installed SWIG using anaconda. It is present in
/home/seismic5/anaconda2/bin/swig
I changed SWIG=None to SWIG=['/home/seismic5/anaconda2/bin/swig']
When I run ./configure it shows SWIG=None again.
How can I fix this
We are trying to figure out how to solve this problem.
Meanwhile, it should work if you copy or link your installation of SWIG to /usr/bin:
sudo ln -s /home/seismic5/anaconda2/bin/swig /usr/bin/swig
Hi, I have the same problem, I've installed swig, the configuration is done with swig but the problem persist.
We are trying to figure out how to solve this problem.
Meanwhile, it should work if you copy or link your installation of SWIG to /usr/bin:
sudo ln -s /home/seismic5/anaconda2/bin/swig /usr/bin/swig