Tycho,
don't use PythonWin (unfortunately this comes with one of the
dependencies) you should work with "ObsPy Shell".
PythonWin uses the system python interpreter but the installer creates
a virtual Python environment which separates the system Python from a
ObsPy installation. Python programmer use this concept to have
multiple separated Python environments which do not interfere with
each other.
In order to use the correct python executable use the one in your
installation directory - in your case it seems to be
c:\Users\Daniel\ObsPy\Scripts\python.exe
If so, the following will work (no output):
c:\Users\Daniel\ObsPy\Scripts\python.exe -c 'import obspy'
than you can start writing scripts such as
from obspy.core import read
st = read()
st.plot()
save it as testscript.py and call it on command line
c:\Users\Daniel\ObsPy\Scripts\python.exe /path/to/your/testscript.py
if you choose to use an IDE you have to use the correct Python executable.
Hope it helps,
Robert
Thank you Robert for your help.
I have opened the ObsPy shell, typed in the "easy_install ObsPy"
and seen the dependencies process and install to
c:\Users\Daniel\ObsPy\Scripts. This package has installed a shell
called "PythonWin", and I have edited the path to point to
c:/Users/Daniel/Scripts and I can now see within the library these
files, and listed under the Obspy/Scripts path:
Activate_this.py Easy_install-2.7-script.py
<http://Easy_install-2.7-script.py> . . .
obspy-dataless2resp-script.py . . . obspy-xseed2dataless-script.py
. . etcetera
I then open Python, type in the following from the tutorial, and
receive back the following error.
import glob from obspy.core import read
Traceback (most recent call last): File "<interactive input>", line
1, in <module> ImportError: No module named obspy.core
I cannot figure out how to launch the obspy-runtests script quite
yet.
I can, however, add 1 + 2 and get three, and create a do-while loop
that counts from three to zero. I can also print variables that
contain the text string "Hello World". However what I really want
to do is create waveform graphs, convert data file formats, pick
Pg, Pn, Sg,Sn arrival times at each station, compute hypocenters,
examine residuals, ascertain focal mechanisms, moment tensors,
generate synthetics, figure out the weird crustal phases, then
autocorrelate the hundreds of aftershocks that fill my dataset from
the several local stations of the temporary deployment.
Cheers, and thank you ahead of time for releasing this processing
tool - I hope I can move from beginner to helpful contributor over
the course of this next few months.
Daniel Burk Michigan State University
Hi Tycho,
seems like the installer is a bit broken for Windows 8 - I just
tested it and it actually did install all dependencies but not the
ObsPy package itself
To fix this for now just run "ObsPy Shell" from the start tile
thingy (or from your start menu if you have) and run "easy_install
obspy". After that test if it works calling obspy-runtests.
Cheers, Robert
Good morning, I just got back from the Earthscope meeting, all
excited to give Obspy a go. I've followed the instructions on
the website, and gone through the installation of the 64-bit
Obspy onto my windows 8 computer. All looks good, and I can open
various windows into a python 2.7 interpreter. I'm ready to go!
However...
Where to go next? I have a directory full of SAC files for an
earthquake I wish to examine; I have my Python installed.
Presumably the Obspy modules are somewhere. However, Window #1
of the tutorial called 'getting started' assumed I've already
started. When I attempt to follow along, the python shell fails
to recognize that obspy.core exists and thus I cannot generate
anything, much less an initial plot.
My guess is that I need to somehow put the obspy package into
the search path, but the installer didn't do it automatically.
Is there a precursor tutorial to 'getting started' that helps me
configure the python interpreter such that it integrates the
Obspy package? It is my assumption that the installer was
supposed to configure the package for preparation. I could
probably use a bit of documentation that takes me from
installation through waveform plot, then shows me how to plot
multiple stations for a given event, align, and locate hypocenter
and epicenter. Moment tensor would be nice, too. Synthetics would
be icing on the cake.
Anyone want to help? I'm a willing pupil!
_______________________________________________ obspy-users
mailing list obspy-users@lists.swapbytes.de
<mailto:obspy-users@lists.swapbytes.de>
http://lists.swapbytes.de/mailman/listinfo/obspy-users
_______________________________________________ obspy-users mailing
list obspy-users@lists.swapbytes.de
<mailto:obspy-users@lists.swapbytes.de>
http://lists.swapbytes.de/mailman/listinfo/obspy-users
_______________________________________________ obspy-users mailing
list obspy-users@lists.swapbytes.de
http://lists.swapbytes.de/mailman/listinfo/obspy-users
- --
Dr. Robert Barsch
EGU Office Munich
Luisenstr. 37
80333 Munich
Germany
Phone: +49-89-21806549
Fax: +49-89-218017855
eMail: barsch@egu.eu