Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS client ImportError: cannot load library /usr/local/lib/libgridstore.0.dylib #27

Open
AnggaSuherman opened this issue Sep 24, 2022 · 1 comment

Comments

@AnggaSuherman
Copy link
Member

Environment:

  • macOS Big Sur v11.6.5
  • python version: 3.10.0b4

Steps to produce the issue:

#Created virtual env via pyenv
pyenv virtualenv 3.10.0b4 onDemand
#Could not activate so had to run the following
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
#Activated virtual env
pyenv activate onDemand
#Installed libraries
python -m pip install pandas
python -m pip install griddb_python

When running the sample app, the following message appeared:

Traceback (most recent call last):
  File "/Users/Angga/Documents/GitHub/OnDemandTraining/Python/tutorial.py", line 3, in <module>
    import griddb_python as griddb
  File "/Users/Angga/.pyenv/versions/3.10.0b4/envs/onDemand/lib/python3.10/site-packages/griddb_python.py", line 21, in <module>
    import _griddb_python
ImportError: dlopen(/Users/Angga/.pyenv/versions/3.10.0b4/envs/onDemand/lib/python3.10/site-packages/_griddb_python.cpython-310-darwin.so, 2): Library not loaded: /usr/local/lib/libgridstore.0.dylib
  Referenced from: /Users/Angga/.pyenv/versions/3.10.0b4/envs/onDemand/lib/python3.10/site-packages/_griddb_python.cpython-310-darwin.so
  Reason: image not found
@knonomura
Copy link
Member

Sorry for late reply.

Library not loaded: /usr/local/lib/libgridstore.0.dylib

The libgridstore.0.dylib means GridDB C Client library.

Because the package for GridDB Python Client already includes C Client Library,
so you don't need install GridDB C Client on MacOS.

But you must set the path installed GridDB C Client Libraries to DYLD_LIBRARY_PATH .

Example:
~/.pyenv/versions/3.6.9/lib/python3.6/site-packages/griddb/

To get the path/to/python/site-packages (after installing griddb_python):

$ python3 -m pip show griddb_python

It will display the output similar to:

Name: griddb-python
Version: 0.8.5
Summary: GridDB Python Client Library built using SWIG
Home-page: https://github.com/griddb/python_client/
Author: Katsuhiko Nonomura
Author-email: [contact@griddb.org](mailto:contact@griddb.org)
License: Apache Software License
Location: /Users/xxx/.pyenv/versions/3.6.9/lib/python3.6/site-packages
Requires:
Required-by:

You can find the path/to/python/site-packages at Location: field.

Before running the program that use griddb_python,
please export path/to/python/site-packages to DYLD_LIBRARY_PATH:

Example:
$ export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Users/xxx/.pyenv/versions/3.6.9/lib/python3.6/site-packages"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants