Raspberry BOOM

Ok – did that.

Now to the first step:

(base) C:\Users\Ken>conda config --add channels conda-forge

Warning: ‘conda-forge’ already in ‘channels’ list, moving to the top

Seems OK

Now the second step:

(base) C:\Users\Ken>conda create -n obspy python=3.7

WARNING: A directory already exists at the target location ‘C:\Users\Ken\Anaconda3\envs\obspy’

but it is not a conda environment.

Continue creating environment (y/[n])

Should I answer yes?

Ken

Yes, the first warning is simply telling that a channel called like that already exists.

For the second, you can click Yes, the folder is a residue of the old installation, but it should be empty since we cleared the environment before.

OK - so I repeated the install and it seemed OK (as before) but I got the same error message. For fun, I tried several of the obspy exe programs and they all yield the same result.

(obspy) C:\Users\Ken>obspy-runtests
Fatal error in launcher: Unable to create process using '“d:\bld\obspy_1593448028650_h_env\python.exe” “C:\Users\Ken\Anaconda3\envs\obspy\Scripts\obspy-runtests.exe” ': The system cannot find the file specified.

(obspy) C:\Users\Ken>obspy-scan.exe
Fatal error in launcher: Unable to create process using '“d:\bld\obspy_1593448028650_h_env\python.exe” “C:\Users\Ken\Anaconda3\envs\obspy\Scripts\obspy-scan.exe” ': The system cannot find the file specified.

(obspy) C:\Users\Ken>obspy-plot.exe
Fatal error in launcher: Unable to create process using '“d:\bld\obspy_1593448028650_h_env\python.exe” “C:\Users\Ken\Anaconda3\envs\obspy\Scripts\obspy-plot.exe” ': The system cannot find the file specified.

Looking at python in my Windows programs, I seem to have version 2.7 and 3.7 installed. If I search for “python.exe” I find only version 2.7, and it is located in:

d:\python27\

so Anaconda is on drive C: and python is on drive D:

If that is a problem:

Is there a way to specify that arrangement? or do I have to uninstall/reinstall something?

Thanks
Ken

Ah, here’s where the issue is!

For some reason, an installation of Python went to the d: drive, and this generates some confusion for obspy after the installation.

My advice, since I don’t want you to have to go around and change system paths, would be, uninstall everything, obspy, python, anaconda.

After clearing your system, reboot it and check that everything has been deleted properly (if not, you can do it manually).

Only then reinstall Anaconda/obspy with the usual procedure, which is the correct one.

It should not take you long, maybe 30 min at maximum, but with this, there will be no issues about mixing versions in different drives since you will have only the last one.

OK - I used Windows to uninstall the python(s) that I had as well as anaconda, then rebooted the PC and re-installed Anaconda (3.8) 64-bit and the other (obspy) stuff.

However, it did not fix the problem :frowning:

If you google that error message you will find that many things can cause it. I don’t believe that the “d” means d:\ drive but rather is some placeholder that has not been properly evaluated due to failed execution of the program. The problem may be more common in Windows where upper case / lower case names are not rigorously enforced. But lots of things can cause the problem. For example, a space character in a file path specification.

I have no entries in the Windows PATH variable for older versions, which is one of the possible causes. I see no space characters in the paths related to Anaconda.

So I don’t know what else to do. I think that anyone else who does a Windows installation of obspy today might run into the same problem.

Ken

Hello Ken,

I tried to replicate the issue by uninstalling and reinstalling Anaconda+Obspy on two different Win10 computers, but I was not lucky (a strange thing to say) since everything worked fine.

A possible workaround that I’ve seen people suggesting online is to force install the obspy installation wit pip instead that with conda. You can try the following two options (always using Anaconda prompt as administrator):

  1. once inside the obspy environment, use directly: pip install --force-reinstall obspy
  2. delete and re-create the obspy environment, and then using pip again with pip install obspy or pip install --force-reinstall obspy or both of them one after another.

OK - thanks for trying that. I did the pip install (a solution suggested in some of the google hits for this error) and it got me going. (Perhaps at some stage during the original install(s) I should have been running as Admin and was not.)

Here are the test results;
https://tests.obspy.org/112014/

I guess some of the red dots are caused by missing dependencies identified at the top. Should I just pip install them?

Ken

Yes, it is possible that the missing Admin authorization created issues that then ended in giving you that problem.

Yes again, you can crosscheck that list by entering in the obspy environment and then executing conda list. If something is missing, then you can proceed by pip or conda installing them.

After that, if you want to verify that your installation is ok, you can try to execute the code in this page in a jupyter notebook or in jupyter lab:

https://manual.raspberryshake.org/developersCorner.html#converting-counts-to-pascal-to-decibel-using-obspy

That code which will take data from a specific RBOOM station in the network and elaborate it to plot it in the chart you see in the same page.

If that works, then you’ll have no issues with your obspy installation as it is.

alright - I feel like I am almost there. But I am missing something basic - how do I make the notebook use obspy?

If I paste the code into a new Python 3 session and say “run” I get an error

ModuleNotFoundError: No module named ‘obspy’

Ken

This is the general page of Anaconda documentation, you can start from here:

https://docs.anaconda.com/en/latest/anaconda/user-guide/getting-started/

And these are two more extensive documents on how to proceed with jupyter notebooks, from their installation to their usage:

Thanks again.

But not finding the module obspy still sounds like an install issue.

If I print sys.path it seems to be missing something

[‘C:\Users\Ken’,
‘C:\Users\Ken\anaconda3\python38.zip’,
‘C:\Users\Ken\anaconda3\DLLs’,
‘C:\Users\Ken\anaconda3\lib’,
‘C:\Users\Ken\anaconda3’,
‘’,
‘C:\Users\Ken\anaconda3\lib\site-packages’,
‘C:\Users\Ken\anaconda3\lib\site-packages\win32’,
‘C:\Users\Ken\anaconda3\lib\site-packages\win32\lib’,
‘C:\Users\Ken\anaconda3\lib\site-packages\Pythonwin’,
‘C:\Users\Ken\anaconda3\lib\site-packages\IPython\extensions’,
‘C:\Users\Ken\.ipython’]

should there be a line in here to an obspy directory?

That double quote is actually two single quotes with nothing in between,

Ken

OK - I think I figured out my issue. It is kind of an install issue: I was launching the Jupyter notebook from the Jupyter notebook shortcut in Windows. In order to get the correct environment for obspy, I needed to start up the notebook from the anaconda shortcut for the obspy environment.

I expect that it is possible to make a shortcut for Jupyter that starts it directly in the right (obspy) environment. I am not sure if modifying the shortcut is enough, or you need something else.

Anyway - by starting the notebook from the obspy environment of the command line, it works.

Thanks for your help!

Ken

1 Like