Trouble with install Ubuntu precise

Hi,

I have been trying to install Obspy via the apt repository. Once installed if I run import obspy i get :
ImportError: <module ‘obspy.seg2.seg2’ from ‘/usr/lib/python2.7/dist-packages/obspy/seg2/seg2.py’> has no ‘writeSEG2’ attribute

if I run from obspy.core import read:

TypeError: not all arguments converted during string formatting

I am confused as to where the problem exists during the installation?

Thanks,
Nick

Hi,
I have been trying to install Obspy via the apt repository. Once
installed if I run import obspy i get :
ImportError: <module 'obspy.seg2.seg2' from
'/usr/lib/python2.7/dist-packages/obspy/seg2/seg2.py'> has no
'writeSEG2' attribute

if I run from obspy.core import read:

TypeError: not all arguments converted during string formatting

I am confused as to where the problem exists during the installation?

Thanks,
Nick

Dear Nick,

Try installation that way:

And check obspy's version, by typing in python shell:

import obspy
obspy.__version__

Best Regards,
Nikos

The Debian/Ubuntu packages should really work, I would be pretty
surprised if the didn't. I will try to double check as soon as possible
(I think I have a precise virtual box somewhere..).

The error message is pretty confusing too. We never had write support
for SEG2 and the line of code that produces your error was removed in a
commit in March 2013
(https://github.com/obspy/obspy/commit/083bc92ff3f4f1da5ad11033bb2e2dc9c3f10384).

best,
Tobias

I tried on a clean precise build in a virtual box, it installed fine via apt. It is likely some conflict with remnant files from a version I uninstalled in the past.
Thanks for the help,
Nick

Good to hear. And that's exactly why we bother building deb packages
for all Debians/Ubuntus out there in the first place. Clean install,
clean uninstall, all in one line. :wink:

best,
Tobias