user
user

Reputation: 11

Cannot import library covsirphy

I am trying to import library COVSIRPHY to jupyter notebook following two steps:

  1. pip install --upgrade covsirphy (I installed it using terminal in specific environment created in anaconda navigator)

It was installed successfully

  1. import covsirphy as cs

I typed in directly in jupyter notebook, but it occured an error:

OSError: dlopen(/opt/anaconda3/envs/test/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so, 0x0006): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib Referenced from: /opt/anaconda3/envs/test/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so Reason: tried: '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/usr/local/lib/libomp.dylib' (no such file), '/usr/lib/libomp.dylib' (no such file)

It is trying to search a path which does not exists, but physically the file libomp.dylib is located in other path, but I have no idea why it is seeking in this path. I am wondering whether this library is possible to install on Mac with chip M1.

enter image description here

enter image description here

Upvotes: 1

Views: 98

Answers (1)

Lisphilar
Lisphilar

Reputation: 1

Please re-install libomp to save 'libomp.dylib' file at '/usr/lib/libomp.dylib' or update PATH to include the current path.

An alternative:
Because the latest development version of covsirphy does not depend on lightgbm, try to reinstall the latest version (>= 3.0.0.dev7).

pip install --upgrade "git+https://github.com/lisphilar/covid19-sir.git#egg=covsirphy"

Upvotes: 0

Related Questions