Comments (10)
Similar to Issue #129 - once you've provided the above, can you also try the suggestions provided there?
from quakemigrate.
Describe the bug
After installing QuakeMigrate, accessing python to execute “import quakemigrate”, prompting the problem.
To Reproduce
import quakemigrate
Traceback (most recent call last):
File "/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/libnames.py", line 39, in _load_cdll
cdll = ctypes.CDLL(str(lib))
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/ctypes/init.py", line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/src/qmlib.cpython-37m-darwin.so, 0x0006): tried: '/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/src/qmlib.cpython-37m-darwin.so' (no such file), '/usr/local/lib/qmlib.cpython-37m-darwin.so' (no such file), '/usr/lib/qmlib.cpython-37m-darwin.so' (no such file)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/Users/guanlingpeng/QuakeMigrate/quakemigrate/init.py", line 18, in
from quakemigrate.signal import QuakeScan, Trigger # NOQA
File "/Users/guanlingpeng/QuakeMigrate/quakemigrate/signal/init.py", line 20, in
from .scan import QuakeScan # NOQA
File "/Users/guanlingpeng/QuakeMigrate/quakemigrate/signal/scan.py", line 23, in
from quakemigrate.core import find_max_coa, migrate
File "/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/init.py", line 20, in
from .lib import migrate, find_max_coa # NOQA
File "/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/lib.py", line 20, in
qmlib = _load_cdll("qmlib")
File "/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/libnames.py", line 45, in _load_cdll
raise ImportError(msg)
ImportError: Could not load extension library 'qmlib'.
dlopen(/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/src/qmlib.cpython-37m-darwin.so, 0x0006): tried: '/Users/guanlingpeng/QuakeMigrate/quakemigrate/core/src/qmlib.cpython-37m-darwin.so' (no such file), '/usr/local/lib/qmlib.cpython-37m-darwin.so' (no such file), '/usr/lib/qmlib.cpython-37m-darwin.so' (no such file)
If you have chosen to install from a clone of the github repository, please ensure you have run 'python setup.py install', which will compile and install the C library. See the installation documentation for more details.
Expected behavior
Miss the file 'qmlib.cpython-37m-darwin.so'
Desktop (please complete the following information):
Operating System: macOS Monterey
Python version: Python=3.7
QuakeMigrate version: Version=1.0.0
In addition, the path of running 'import quakemigrate'
In the downloaded package ‘QuakeMigrate’
from quakemigrate.
Great, thanks - can you run the following in terminal and paste the full outputs here:
- Test if the compiled shared object is installed in the conda environment
ls /Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/quakemigrate/core/src
If there is a file that looks like qmlib.cpython-37m-darwin.so
, then the issue is related to #129 - if you change directory to anywhere but /Users/guanlingpeng/QuakeMigrate
(such as /Users/guanlingpeng/QuakeMigrate/examples
) and try again. Or you could switch to the tests
directory and try running the tests.
If the file is not there, then it suggests an issue when the core routines are being compiled. We have encountered issues with Mac compilers in the past, so it is not unheard of. If this is the case, you can rerun pip install .
in the base QuakeMigrate directory and share the entire output here.
- Check compiler version you have installed and where. In terminal, with your environment activated to be sure, enter:
gcc -v
which gcc
We should be able to troubleshoot any issues with this information.
from quakemigrate.
It is OK when install pyqt.
from quakemigrate.
@TomWinder Yes, this issue is resolved, after changing directory and installing pyqt 5.9.2.
Thank you very much!
from quakemigrate.
Hi, please provide information as requested in the template:
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behaviour (including error messages if applicable).
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
- Operating System:
- Python version:
- QuakeMigrate version:
Additional context
Add any other context about the problem here.
from quakemigrate.
Similar to Issue #129 - once you've provided the above, can you also try the suggestions provided there?
Oh my god, I still don't know how to solve it!!
from quakemigrate.
Can you provide the information that Tom requested above? In particular, the operating system and where in your path you are running the import quakemigrate
command.
Thank you.
from quakemigrate.
Thanks, hemmelig.
The file is there, I then change the path to */QuakeMigrate/examples, and try again. Prompting:
(quakemigrate) guanlingpeng@x86_64-apple-darwin13 examples % ls
Icequake_Iceland Icequake_Rutford Volcanotectonic_Iceland benchmarks template_scripts
(quakemigrate) guanlingpeng@x86_64-apple-darwin13 examples % pwd
/Users/guanlingpeng/QuakeMigrate/examples
(quakemigrate) guanlingpeng@x86_64-apple-darwin13 examples % python
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 05:59:23)
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import quakemigrate
Traceback (most recent call last):
File "", line 1, in
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/quakemigrate/init.py", line 24, in
matplotlib.use("Qt5Agg")
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 307, in wrapper
return func(*args, **kwargs)
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/matplotlib/init.py", line 1307, in use
switch_backend(name)
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/matplotlib/pyplot.py", line 221, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 11, in
from .backend_qt5 import (
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/matplotlib/backends/backend_qt5.py", line 15, in
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 13, in
from matplotlib.backends.qt_compat import QtGui
File "/Users/guanlingpeng/anaconda3/envs/quakemigrate/lib/python3.7/site-packages/matplotlib/backends/qt_compat.py", line 158, in
raise ImportError("Failed to import any qt binding")
ImportError: Failed to import any qt binding
Problem maybe the version of matplotlib. My version is matplotlib=3.2.2. So, I try numerous versions, problem remains and varies.
from quakemigrate.
@glPeng-seis Please can you confirm that this is issue is now resolved, after changing directory and sorting out pyqt? Cheers.
from quakemigrate.
Related Issues (20)
- [BUG]: All traces rejected where one pair can't be merged due to "Incompatible traces" error.
- error in compute_traveltimes HOT 4
- Issue Import QuakeMigrate in Python (AttributeError) HOT 2
- No files found in archive for this time period : No detection HOT 4
- Overlapping waveforms in locate plot summary HOT 4
- PickTimes export to Obspy HOT 7
- [BUG]: skfmm LUT generation doesn't work for the southern hemisphere HOT 2
- AttributeError: module 'numpy' has no attribute 'bool'. HOT 6
- FEAT: Make picking optional.
- BUG: 'discarded' events not being plotted in Trigger summary
- BUG: Binder notebooks do not work. HOT 1
- Allow multiple channels for P phase in event & pick plots
- FEAT: Build QuakeMigrate travel-time lookup tables from 3-D velocity models
- BUG: plotting failure with matplotlib 3.8 HOT 2
- Data failed to pass the specified data quality criteria HOT 3
- Tests failing due to change in NonLinLoc source directory HOT 2
- BUG: cibuildwheel fails to build wheels for Windows
- Tests timing out on data acquisition from EarthScope stage HOT 7
- Warnings about deprecation of Node.js 16 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quakemigrate.