Closed lengri closed 1 year ago
I had the same issue - I don't think it is pulling the processors from the right place. I am not an expert here, but so far this fix is working for me:
In the file: /lib/python3.10/site-packages/kite/sandbox_scene.py
Instead of line 11:
from kite.sources import CompoundModelProcessor, DislocProcessor, PyrockoProcessor
Use the following:
from kite.sources.compound_sources import CompoundModelProcessor
from kite.sources.okada import DislocProcessor
from kite.sources.pyrocko_gf import PyrockoProcessor
I tried changing the imports, but it still doesn't work, unfortunately. The error-message is also still the same. But thanks for the suggestion!
Should be fixed now on master
. Please check...
The OkadaSource
part works now, although I had to install libstdcxx-ng
before being able to plot anything. However, the rectangular source model PyrockoRectangluarSource
doesn't work.
Running this modified script based on the Modelling Static Displacement script results in the following error:
Could not execute pyrocko.gf.LocalEngine.process! LocalEngine Exception: directory "/home/lennart/PycharmProjects/kiteProject2/gfstore_halfspace" does not seem to contain a GF store ("config" file not found)
I thought it might be caused by something related to PyCharm, but I also cannot run talpa
from the command line. Typing talpa
from inside my conda env results in:
File "/home/lennart/miniconda3/envs/KiteEnv/bin/talpa", line 5, in
from kite.talpa.main import main File "/home/lennart/miniconda3/envs/KiteEnv/lib/python3.10/site-packages/kite/talpa/init.py", line 1, in from .talpa import Talpa # noqa File "/home/lennart/miniconda3/envs/KiteEnv/lib/python3.10/site-packages/kite/talpa/talpa.py", line 8, in from .sandbox_model import SandboxModel File "/home/lennart/miniconda3/envs/KiteEnv/lib/python3.10/site-packages/kite/talpa/sandbox_model.py", line 8, in from . import sources File "/home/lennart/miniconda3/envs/KiteEnv/lib/python3.10/site-packages/kite/talpa/sources/init.py", line 3, in from .pyrocko import ( File "/home/lennart/miniconda3/envs/KiteEnv/lib/python3.10/site-packages/kite/talpa/sources/pyrocko.py", line 6, in from kite.sources import ( ImportError: cannot import name 'PyrockoDoubleCouple' from 'kite.sources' (/home/lennart/miniconda3/envs/KiteEnv/lib/python3.10/site-packages/kite/sources/init.py)
Or do I need to activate talpa in another way?
Hi @lengri, sorry for the trouble. We are currently in the process of getting kite running with current versions of its dependencies. There are still some pieces which have not been updated. I added some quick fixes to get talpa running again but there might still be some remaining issues. Please try again with current master
.
No worries! I set up the new version of kite and can now open tapla
, but adding a RectangularSource
yields
ERROR:SandboxScene.PyrockoProcessor:Could not execute pyrocko.gf.LocalEngine.process! LocalEngine Exception: directory "/home/lennart" does not seem to contain a GF store ("config" file not found) ERROR:SandboxScene.PyrockoProcessor:Could not execute pyrocko.gf.LocalEngine.process! LocalEngine Exception: directory "/home/lennart" does not seem to contain a GF store ("config" file not found)
OkadaSource
works fine.
Thats to be expected as the other sources require pre-computed Greens Functions- the "store" it is referring to.
@lengri, compute or download a static GF store. See https://greens-mill.pyrocko.org/ to use the Pyrocko sources. More info here https://pyrocko.org/docs/current/topics/pyrocko-gf.html
I set up a conda environment for using kite in Ubuntu 22.04 using the following commands:
conda create -n pyrockoEnv
conda activate pyrockoEnv
conda install -c pyrocko pyrocko
pip install git+https://github.com/Turbo87/utm
pip install git+https://github.com/pyrocko/kite
Doing
conda list
shows pyrocko, utm and kite in my env package list. Specifically, kite shows askite 1.5.6.dev2+ga9d3a3f pypi_0 pypi
.I setup a PyCharm project using an interpreter based on the conda environment and can do things like
help("pyrocko")
&help("utm")
without problem, but typinghelp("kite")
results inThe same error happens when trying to follow the Modelling Static Displacement Script. When typing
from kite import SandboxScene
:Any ideas how to fix this?