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

Issue regarding import #7904

Closed
jmkim93 opened this issue Apr 26, 2023 · 3 comments
Closed

Issue regarding import #7904

jmkim93 opened this issue Apr 26, 2023 · 3 comments
Assignees

Comments

@jmkim93
Copy link

jmkim93 commented Apr 26, 2023

Describe the bug
After installing Taichi in conda environment on my Apple Silicon Mac using

pip install taichi

I encountered an import issue as follows.

To Reproduce

import taichi

Log/Screenshots

runcell(0, '/Users/XXXX/Documents/ONN/Practices/taichi_ex.py')
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 /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File ~/Documents/ONN/Practices/taichi_ex.py:1
    import taichi as ti

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/__init__.py:3
    from taichi._funcs import *

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/_funcs.py:3
    from taichi.lang import impl, ops

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/lang/__init__.py:1
    from taichi.lang import impl, simt

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/lang/impl.py:5
    from taichi._lib import core as _ti_core

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/_lib/__init__.py:1
    from taichi._lib.utils import ti_python_core as core

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/_lib/utils.py:110
    ti_python_core = import_ti_python_core()

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/_lib/utils.py:55 in import_ti_python_core
    raise e from None

  File /opt/homebrew/Caskroom/miniforge/base/envs/onn/lib/python3.10/site-packages/taichi/_lib/utils.py:45 in import_ti_python_core
    from taichi._lib.core import \

ImportError: dlopen(/opt/homebrew/Caskroom/miniforge/base/envs/onn/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: <3DE40B11-788F-3921-8F90-38A5B48C4702> /opt/homebrew/Caskroom/miniforge/base/envs/onn/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
Can I get a comment on this issue?
Thanks.

@bobcao3
Copy link
Collaborator

bobcao3 commented Apr 26, 2023

Can you try to remove or reinstall libzstd in homebrew?

@turbo0628 turbo0628 moved this from Untriaged to Todo in Taichi Lang Apr 28, 2023
@erizmr erizmr moved this from Todo to In Progress in Taichi Lang May 5, 2023
@feisuzhu
Copy link
Contributor

feisuzhu commented May 5, 2023

Sorry about the late reply, it's a known issue on M1 wheels which will be fixed in v1.6.0.

You can workaround this by brew install zstd

@feisuzhu
Copy link
Contributor

v1.6.0 is released

@github-project-automation github-project-automation bot moved this from In Progress to Done in Taichi Lang May 12, 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

3 participants