Git Product home page Git Product logo

Comments (10)

hemmelig avatar hemmelig commented on June 9, 2024 1

Similar to Issue #129 - once you've provided the above, can you also try the suggestions provided there?

from quakemigrate.

glPeng-seis avatar glPeng-seis commented on June 9, 2024 1

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.

hemmelig avatar hemmelig commented on June 9, 2024 1

Great, thanks - can you run the following in terminal and paste the full outputs here:

  1. 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.

  1. 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.

glPeng-seis avatar glPeng-seis commented on June 9, 2024 1

It is OK when install pyqt.

from quakemigrate.

GPeng00 avatar GPeng00 commented on June 9, 2024 1

@TomWinder Yes, this issue is resolved, after changing directory and installing pyqt 5.9.2.
Thank you very much!

from quakemigrate.

TomWinder avatar TomWinder commented on June 9, 2024

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.

glPeng-seis avatar glPeng-seis commented on June 9, 2024

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.

hemmelig avatar hemmelig commented on June 9, 2024

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.

glPeng-seis avatar glPeng-seis commented on June 9, 2024

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.

TomWinder avatar TomWinder commented on June 9, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.