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

Fresh install on macos (13.2.1, M1) not working because of missing libzstd dylib #7483

Closed
buhrmann opened this issue Mar 3, 2023 · 2 comments
Assignees
Milestone

Comments

@buhrmann
Copy link

buhrmann commented Mar 3, 2023

A fresh install leads to '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache) on import taichi.

To Reproduce

conda create -n taichi python=3.10
conda activate taichi
pip install taichi
python -c "import taichi"

Log/Screenshots

python -c "import taichi"
Share object taichi_python import failed, check this page for possible solutions:
https://docs.taichi-lang.org/docs/install
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/__init__.py", line 3, in <module>
    from taichi._funcs import *
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/_funcs.py", line 3, in <module>
    from taichi.lang import impl, ops
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/lang/__init__.py", line 1, in <module>
    from taichi.lang import impl, simt
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/lang/impl.py", line 5, in <module>
    from taichi._lib import core as _ti_core
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/_lib/__init__.py", line 1, in <module>
    from taichi._lib.utils import ti_python_core as core
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/_lib/utils.py", line 110, in <module>
    ti_python_core = import_ti_python_core()
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/_lib/utils.py", line 55, in import_ti_python_core
    raise e from None
  File "/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/_lib/utils.py", line 45, in import_ti_python_core
    from taichi._lib.core import \
ImportError: dlopen(/Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/_lib/core/taichi_python.cpython-310-darwin.so, 0x000A): Library not loaded: /opt/homebrew/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <7C5BD31E-E269-383D-B17D-A5053D1DE6A6> /Users/thomas/mambaforge/envs/taichi/lib/python3.10/site-packages/taichi/_lib/core/taichi_python.cpython-310-darwin.so
  Reason: tried: '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)

Additional comments
I have other conda environments with libzstd installed, presumably because it ships with certain other packages, e.g.:

mdfind -name libzstd
2023-03-03 18:04:40.019 mdfind[34594:223484] [UserQueryParser] Loading keywords and predicates for locale "en_GB"
/Users/thomas/mambaforge/lib/libzstd.1.5.2.dylib
/Users/thomas/mambaforge/envs/grapy/lib/libzstd.1.5.2.dylib
/Users/thomas/mambaforge/pkgs/zstd-1.5.2-hf913c23_6/lib/pkgconfig/libzstd.pc

So perhaps the taichi pypi package fails to include the necessary zstd as a dependency? I've tried installing the zstd pypi package manually, but this doesn't seem to ship the required library either.

@buhrmann
Copy link
Author

buhrmann commented Mar 3, 2023

To follow up, the workaround seems simple enough (brew install zstd seems to do the trick), but perhaps there is a way to ship the library automatically? Otherwise it may just need a comment in your install instructions.

@bobcao3
Copy link
Collaborator

bobcao3 commented Mar 3, 2023

This is probably a bug or unintentional... We shouldn't be dynamically linking to zstd, we will investigate

@FantasyVR FantasyVR moved this from Untriaged to Todo in Taichi Lang Mar 10, 2023
@feisuzhu feisuzhu added this to the v1.6.0 milestone Mar 17, 2023
@feisuzhu feisuzhu assigned feisuzhu and unassigned ailzhang Apr 14, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Taichi Lang Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants