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

Import vulkan failed on Mac. #91

Open
BelconZhao opened this issue Jun 11, 2024 · 1 comment
Open

Import vulkan failed on Mac. #91

BelconZhao opened this issue Jun 11, 2024 · 1 comment

Comments

@BelconZhao
Copy link

I tried to learn vukan today with my Macbook. I installed SDK (vulkansdk-macos-1.3.283.0.dmg). I also installed vulkan module via pip. You can check my output attached as below. But I got "Cannot find Vulkan sDK version" error when I import vulkan module. The error happened when python tried to load dynamic library. I checked with module cffi and found it worked fine. That means this issue is not related to the path.

Any suggestions? Thanks a lot.

`(.venv) zhaob@C02GC2VUMD6T vulkan % pip list
Package Version


cffi 1.16.0
glfw 2.7.0
pip 24.0
pycparser 2.22
vulkan 1.3.275.1
(.venv) zhaob@C02GC2VUMD6T vulkan % python3 -m "import vulkan"
/Users/belconzhao/Study/python/Vulkan/vulkan_tutorial/.venv/bin/python3: No module named import vulkan
(.venv) zhaob@C02GC2VUMD6T vulkan % python3 -c "import vulkan"
Traceback (most recent call last):
File "", line 1, in
File "/Users/belconzhao/Study/python/Vulkan/vulkan_tutorial/.venv/lib/python3.12/site-packages/vulkan/init.py", line 1, in
from vulkan._vulkan import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/belconzhao/Study/python/Vulkan/vulkan_tutorial/.venv/lib/python3.12/site-packages/vulkan/_vulkan.py", line 111, in
raise OSError('Cannot find Vulkan SDK version. Please ensure that it is '
OSError: Cannot find Vulkan SDK version. Please ensure that it is installed and that the <sdk_root>//lib/ folder is in the library path
(.venv) zhaob@C02GC2VUMD6T vulkan % python3 - < import cffi
heredoc> ffi = cffi.FFI()
heredoc> lib = ffi.dlopen('libvulkan.dylib')
heredoc> print(f'{lib}')
heredoc> ffi.dlclose(lib)
heredoc> EOF
<cffi.api._make_ffi_library..FFILibrary object at 0x10d98e960>
(.venv) zhaob@C02GC2VUMD6T vulkan %
`

@junqingqiao
Copy link

I'm experiencing the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants