Closed JBAjo-Franklin closed 2 years ago
Hi, @JBAjo-Franklin, Thanks for reporting this.
What directory are you in when you start your Python interpreter? Make sure you leave the PyKonal source code directory before opening the interpreter.
Interesting - I was in the pykonal directory. Unfortunately, different error when I'm in home or somewhere else
(base) admin@Jonathans-MacBook-Pro riceSeisMat % python Python 3.8.3 (default, Jul 2 2020, 11:26:31) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy as np import pykonal Traceback (most recent call last): File "
", line 1, in ModuleNotFoundError: No module named 'pykonal'
I assume this is a path issue for module; I'm not familiar with the way conda and pip set this up for python - something new to learn - J.
From the top-level directory of the source code, executing pip install .
will install the package into whichever conda environment is currently active. For example, you might try something like
>$ conda create --name py39 python=3.9 cython
>$ conda activate py39
(py39) >$ cd src/pykonal
(py39) >$ pip install .
(py39) >$ cd ~
(py39) >$ python
>>> import pykonal
Thanks! Turns out a remove/reinstall solved the mysterious path problem. Appreciate the help/response - now to solve some more interesting problems ;)
Best - J.
Great! Closing this Issue. Have fun!
Not a python expert - installing via the conda path and everything seemed to go fine however I'm not able to load pykonal within python (missing module error) when running the examples,
For reference on environment .... Patch 3 version of pykonal-0.2.3b3 Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:50:56) [Clang 11.1.0 ] on darwin