Trouble Installing Obspy for Windows

Ok,

So I open the Obspy shell, and the path is : C:\Programs\Microsoft\Windows\Start Menu\Programs\Obspy.

However, I have another folder located on my desktop also called ‘Obspy’ that contains the following folders : Include, Lib, obspy, Scripts, and tcl (and uninstall).

When I run the Obspy shell and type ‘from obspy import read’ I get, " ‘from’ is not recognized as an internal or external command, operable program or batch file’.

Why is this the case? The Obspy directory that opens when I start the Obspy shell does not contain those above folders that are located on my desktop.

Should I move the folder on my desktop into the other Obspy folder, located here:C:\Programs\Microsoft\Windows\Start Menu\Programs\Obspy ?

Thanks for your help,
Greg

I never edited the environment variables. If I need to do that, should I edit the Path to the location of the Obspy folder?

Thanks,

Greg

Hi Brenn,

Ok,

So I open the Obspy shell, and the path is :
/C:\Programs\Microsoft\Windows\Start Menu\Programs\Obspy/.

ups sorry I meant IPython Console - however calling python or ipython
in the shell should also work

However, I have another folder located on my desktop also called
'Obspy' that contains the following folders : Include, Lib, obspy,
Scripts, and tcl (and uninstall).

what windows version are you running on - this should not appear on
the desktop itself but in the root of your home directory - anyway
leave them now as it is as- and try to point above first

When I run the Obspy shell and type 'from obspy import read' I get,
" 'from' is not recognized as an internal or external command,
operable program or batch file'.

thats a Windows command line - call "python" first

Why is this the case? The Obspy directory that opens when I start
the Obspy shell does not contain those above folders that are
located on my desktop.

virtual environment

Should I move the folder on my desktop into the other Obspy
folder, located here:/C:\Programs\Microsoft\Windows\Start
Menu\Programs\Obspy ?/

no

Cheers,
Robert

- --
Dr. Robert Barsch

EGU Office Munich
Luisenstr. 37
80333 Munich
Germany

Phone: +49-89-21806565
Fax: +49-89-218017855
eMail: barsch@egu.eu

there is no need for changing them if you use the virtualenv in the
correct way - but for now we still have to figure if the installer
failed for you or not ...

Robert

I never edited the environment variables. If I need to do that,
should I edit the Path to the location of the Obspy folder?

Thanks,

Greg

Ok,

So I open the Obspy shell, and the path is :
/C:\Programs\Microsoft\Windows\Start Menu\Programs\Obspy/.

However, I have another folder located on my desktop also called
'Obspy' that contains the following folders : Include, Lib, obspy,
Scripts, and tcl (and uninstall).

When I run the Obspy shell and type 'from obspy import read' I
get, " 'from' is not recognized as an internal or external
command, operable program or batch file'.

Why is this the case? The Obspy directory that opens when I start
the Obspy shell does not contain those above folders that are
located on my desktop.

Should I move the folder on my desktop into the other Obspy
folder, located here:/C:\Programs\Microsoft\Windows\Start
Menu\Programs\Obspy ?/

Thanks for your help, Greg

_______________________________________________ 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-21806565
Fax: +49-89-218017855
eMail: barsch@egu.eu

Ok Robert,

So in review: I have installed Obspy through the installer, and I believe everything installed correctly. If not, is there a test to know if it installed correctly?

I then use the Obspy Shell and attempt to write “From obspy import read”, but the following error arises:

C:\ProgramData\Microsoft\Windows\Start Menu\ Programs\ Obspy> from obspy import read
‘from’ is not recognized as an internal or external command, operable program or batch file.

Firstly, the path to the Obspy folder above is incorrect. The Obspy folder containing Include, Lib, Scripts, tcl, and uninstall is actually at C:\Users\Edge 14 User\Obspy. Is that an issue?

So, if Obspy installed correctly, what is the next step to properly use this module in Python?

Much appreciated. Hopefully I can get this working!
Greg

Hi Brenn,

So in review: I have installed Obspy through the installer, and I
believe everything installed correctly. If not, is there a test to
know if it installed correctly?

I guess its installed properly - you are just not used to virtual
environments :wink:

I then use the Obspy Shell and attempt to write "From obspy import
read", but the following error arises:

<Obspy> C:\ProgramData\Microsoft\Windows\Start Menu\ Programs\
> from obspy import read 'from' is not recognized as an
internal or external command, operable program or batch file.

again its a shell not python! as I said before execute "python" here
and then import, e.g.

<Obspy> C:\YourPath\Obspy> python.exe

Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

from obspy import read

Environment variables should all be set properly so python.exe should
be found

Firstly, the path to the Obspy folder above is incorrect. The
Obspy folder containing Include, Lib, Scripts, tcl, and uninstall
is actually at C:\Users\Edge 14 User\Obspy. Is that an issue?

thats exactly what I expect: Obspy folder within your home directory -
system path in the ObsPy shell will point to this folder

So, if Obspy installed correctly, what is the next step to properly
use this module in Python?

first check if you can import it now - after that you just call your
python scripts via

C:\Users\Edge 14 User\Obspy\Scripts\python.exe myscript.py

or if you prefer to work on shell - activate your virtual environment via

C:\Users\Edge 14 User\Obspy\Scripts\activate.bat

and run your programs like:

python myscript.py

Cheers,
Robert

- --
Dr. Robert Barsch

EGU Office Munich
Luisenstr. 37
80333 Munich
Germany

Phone: +49-89-21806565
Fax: +49-89-218017855
eMail: barsch@egu.eu

OK Robert, this error occurred. What do you think this error is due to? My machine is 64 bit, so is there a 64/32 bit problem?

(ObsPy) C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ObsPy>python
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

from obspy import read
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy_init_.py”, li
ne 32, in
from obspy.core.utcdatetime import UTCDateTime
File "C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core_init_.py
“, line 86, in
from obspy.core.util.attribdict import AttribDict
File “C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core\util__init
.py", line 24, in
from obspy.core.util.base import NamedTemporaryFile, add_doctests,
File “C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core\util\base.p
y”, line 12, in
from obspy.core.util.misc import toIntOrZero
File “C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core\util\misc.p
y”, line 13, in
import numpy as np
File "C:\Python27\lib\site-packages\numpy_init
.py", line 142, in
import add_newdocs
File “C:\Python27\lib\site-packages\numpy\add_newdocs.py”, line 9, in
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib_init
.py”, line 4, in
from type_check import *
File “C:\Python27\lib\site-packages\numpy\lib\type_check.py”, line 8, in
import numpy.core.numeric as nx
File "C:\Python27\lib\site-packages\numpy\core_init
.py”, line 5, in
import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.

thats a numpy error - did you had numpy installed before?

try to deinstall numpy via windows and install a newer version of it

Robert

OK Robert, this error occurred. What do you think this error is
due to? My machine is 64 bit, so is there a 64/32 bit problem?

(ObsPy) C:\ProgramData\Microsoft\Windows\Start
Menu\Programs\ObsPy>python Python 2.7.6 (default, Nov 10 2013,
19:24:18) [MSC v.1500 32 bit (Intel)] on win32 Type "help",
"copyright", "credits" or "license" for more information.

from obspy import read

Traceback (most recent call last): File "<stdin>", line 1, in
<module> File
"C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\__init__.py",

li

ne 32, in <module> from obspy.core.utcdatetime import UTCDateTime
File
"C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core\__init__.py

", line 86, in <module>

from obspy.core.util.attribdict import AttribDict File
"C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core\util\__init

__.py", line 24, in <module>

from obspy.core.util.base import NamedTemporaryFile, add_doctests,
\ File
"C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core\util\base.p

y", line 12, in <module>

from obspy.core.util.misc import toIntOrZero File
"C:\Users\EDGE14~1\ObsPy\lib\site-packages\obspy-0.8.4-py2.7-win32.egg\obspy\core\util\misc.p

y", line 13, in <module>

import numpy as np File
"C:\Python27\lib\site-packages\numpy\__init__.py", line 142, in
<module> import add_newdocs File
"C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in
<module> from numpy.lib import add_newdoc File
"C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in
<module> from type_check import * File
"C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in
<module> import numpy.core.numeric as _nx File
"C:\Python27\lib\site-packages\numpy\core\__init__.py", line 5, in
<module> import multiarray ImportError: DLL load failed: %1 is not
a valid Win32 application.

- --
Dr. Robert Barsch

EGU Office Munich
Luisenstr. 37
80333 Munich
Germany

Phone: +49-89-21806565
Fax: +49-89-218017855
eMail: barsch@egu.eu

YES! It has finally worked!

Robert, thank you very much for your help. You didn’t have to spend all that time with me, and I truly appreciate your help.

Prost!

Greg

YES! It has finally worked!

your welcome

Robert, thank you very much for your help. You didn't have to
spend all that time with me, and I truly appreciate your help.

Prost!

we really need that donate-a-beer button :wink:

Cheers,
Robert

- --
Dr. Robert Barsch

EGU Office Munich
Luisenstr. 37
80333 Munich
Germany

Phone: +49-89-21806565
Fax: +49-89-218017855
eMail: barsch@egu.eu