python_client
python_client copied to clipboard
MacOS client ImportError: cannot load library /usr/local/lib/libgridstore.0.dylib
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
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: [[email protected]](mailto:[email protected])
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"