dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #13086
Re: dolfin/viper plotting
On Thu, April 16, 2009 16:13, Johan Hake wrote:
> On Thursday 16 April 2009 15:57:23 Patrick Riesen wrote:
>> Johan Hake wrote:
>> > On Thursday 16 April 2009 15:03:26 Patrick Riesen wrote:
>> >> hi all
>> >>
>> >> i updated to dolfin0.9 today on my amd64-debian-linux4.0. most seems
>> to
>> >> work fine but i get the following error when i call viper with an xml
>> >> file, such as
>> >
>> > What versions of python do you have installed, maybee more crucial
>> what
>> > version of python were your PyDOLFIN compiled against?
>> >
>> > What does,
>> >
>> > pkg-config --modversion python-2
>> >
>> > tell you? This should be the version your PyDOLFIN installation is
>> > compiled against. It looks like your installation at least resides in
>> > python2.5, these versions needs to be the same.
>>
>> pkg-config --modversion python-2 gives me 2.4.4,
>>
>> in dolfin0.8 it worked fine and i thought it was compiled against
>> python2.5. on our university system, python2.5 is not the default, so i
>> had
>> to manually point everything towards python2.5 but this might be wrong
>> therefore.
>
> It's probably wrong when your PyDOLFIN is compiled againes 2.4. Do not
> know
> why it suddenly breaks.
>
>> what is the place the above command fetches the information on?
>
> It's probably the pkg-config file python-2.pc, which most probably is
> created
> during the installation process. See in:
>
> dolfin/scons/simula-scons/simula_scons/pkgconfiggenerators/python.py
>
> Unfortunatly it is not possible (yet) to set the default python
> installation
> directory through the scons system. Should this be possible?
It is possible. Simply run SCons with the Python binary you want to use:
/some/path/pythonX.Y /some/other/path/scons
You should probably first remove the python-2.pc file under
scons/pkgconfig and any such file in PKG_CONFIG_PATH to make sure that a
new one is generated.
Johannes
> For example:
>
> scons withPythonDir=/where/your/python/installations/is
>
> Johan
>
>> patrick
>>
>> > Johan
>> >
>> >> priesen@vierzack01:/<7>cpp>viper data.xml
>> >> Traceback (most recent call last):
>> >> File "/home/priesen/dolfin0.9/bin/viper", line 123, in <module>
>> >> _main(args[-1], None)
>> >> File "/home/priesen/dolfin0.9/bin/viper", line 77, in _main
>> >> return _dolfin_mesh_plotter(infile, outfile, data=data,
>> >> lutfile=lutfile, datatype=datatype)
>> >> File "/home/priesen/dolfin0.9/bin/viper", line 27, in
>> >> _dolfin_mesh_plotter
>> >> from dolfin import Mesh, UnitSquare, File, plot
>> >> File
>> >> "/home/priesen/dolfin0.9/lib/python2.5/site-packages/dolfin/__init__.py"
>> >>, line 11, in <module>
>> >> import cpp
>> >> File
>> >> "/home/priesen/dolfin0.9/lib/python2.5/site-packages/dolfin/cpp.py",
>> >> line 6, in <module>
>> >> import _cpp
>> >> ImportError:
>> >> /home/priesen/dolfin0.9/lib/python2.5/site-packages/dolfin/_cpp.so:
>> >> undefined symbol: Py_InitModule4
>> >>
>> >> does someone have a clue on what went wrong ?
>> >>
>> >> thanks for your help,
>> >> patrick
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> DOLFIN-dev mailing list
>> >> DOLFIN-dev@xxxxxxxxxx
>> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
>>
>> _______________________________________________
>> DOLFIN-dev mailing list
>> DOLFIN-dev@xxxxxxxxxx
>> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
Follow ups
References