OSError: Yajl cannot be found.
MacOS:
python -m openaoe.main -f openaoe/backend/config/config-template.yaml
Traceback (most recent call last):
File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/zhangsongyang/Projects/OpenAOE/openaoe/main.py", line 10, in <module>
from openaoe.backend.api.route_google import router as google
File "/Users/zhangsongyang/Projects/OpenAOE/openaoe/backend/api/route_google.py", line 4, in <module>
from openaoe.backend.service.service_google import palm_chat_svc, Gemma
File "/Users/zhangsongyang/Projects/OpenAOE/openaoe/backend/service/service_google.py", line 4, in <module>
from jsonstreamer import ObjectStreamer
File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/__init__.py", line 9, in <module>
from jsonstreamer.jsonstreamer import JSONStreamer, ObjectStreamer
File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/jsonstreamer.py", line 14, in <module>
from .yajl.parse import YajlParser, YajlListener, YajlError
File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/yajl/parse.py", line 31, in <module>
yajl = load_lib()
File "/Users/zhangsongyang/miniconda3/envs/openaoe/lib/python3.8/site-packages/jsonstreamer/yajl/parse.py", line 28, in load_lib
raise OSError('Yajl cannot be found.')
OSError: Yajl cannot be found.
I experince similar (Linux):
Python 3.7.16 (default, May 23 2023, 14:46:23) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information.
from jsonstreamer import JSONStreamer
Traceback (most recent call last):
File "
- try to download Yajl source code from https://github.com/lloyd/yajl/tree/2.1.0, compile and install (reference https://cloud.tencent.com/developer/ask/sof/117097623)
- create an link file of /usr/local/lib/libyajl.so.2 in /usr/lib/ sudo ln -s /usr/local/lib/libyajl.so.2 /usr/lib/libyajl.so sudo ln -s /usr/local/lib/libyajl.so.2 /usr/lib/libyajl.so.2
You need to install Yajl and the Python bindings for Yajl.
brew install yajl
pip install yajl