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

ImportError: DLL load failed while importing _dlib_pybind11: Not Found。[Bug]: #2937

Open
ITApeDeHao opened this issue Mar 30, 2024 · 6 comments

Comments

@ITApeDeHao
Copy link

What Operating System(s) are you seeing this problem on?

Windows

dlib version

19.24.99

Python version

3.12

Compiler

GCC 8.1 VS 2022

Expected Behavior

dlib.DLIB_USE_CUDA
TRUE

Current Behavior

use import dlib in python
error: ImportError: DLL load failed while importing _dlib_pybind11: not found。
in my env I can find this model
Only python3.12 have this error! 3.11or 3.10 can use

Steps to Reproduce

conda create --name demo
conda activate demo
pip install build cmake boost
python -m build --wheel
pip install dist\dlib-19.24.99-cp312-cp312-win_amd64.whl
python
import dlib

Anything else?

no

@ITApeDeHao
Copy link
Author

archspec @ file:///croot/archspec_1697725767277/work
blurhash==1.1.4
boltons @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/boltons_1699480450092/work
boost==0.1
Brotli @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/brotli-split_1699473013692/work
build==1.2.1
certifi @ file:///C:/b/abs_35d7n66oz9/croot/certifi_1707229248467/work/certifi
cffi @ file:///C:/b/abs_924gv1kxzj/croot/cffi_1700254355075/work
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
cmake==3.29.0.1
colorama @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/colorama_1699472650914/work
conda @ file:///C:/b/abs_89vd8hj61u/croot/conda_1708369170790/work
conda-content-trust @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/conda-content-trust_1699553484152/work
conda-libmamba-solver @ file:///croot/conda-libmamba-solver_1702997573971/work/src
conda-package-handling @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/conda-package-handling_1699480603217/work
conda_package_streaming @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/conda-package-streaming_1699475879769/work
cryptography @ file:///C:/b/abs_e8cnom_zw_/croot/cryptography_1702071486468/work
decorator==5.1.1
distro @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/distro_1701796812765/work
dlib @ file:///D:/Desktop/dlib/dist/dlib-19.24.99-cp312-cp312-win_amd64.whl#sha256=50eb69973c14e4304d290d0371eb6d25fd64820169b3cf96297765e75431da2a
greenlet==3.0.3
idna @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/idna_1699473483982/work
jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work
jsonpointer==2.1
libmambapy @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/mamba-split_1701809371861/work/libmambapy
Mastodon.py==1.8.1
menuinst @ file:///C:/b/abs_099kybla52/croot/menuinst_1706732987063/work
numpy==1.26.4
opencv-python==4.9.0.80
packaging @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/packaging_1699472459356/work
platformdirs @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/platformdirs_1701797392447/work
pluggy @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/pluggy_1699472504117/work
pybind11==2.12.0
pycosat @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/pycosat_1699482932804/work
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
pyproject_hooks==1.0.0
PySocks @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/pysocks_1699473336188/work
python-dateutil==2.9.0.post0
python-magic-bin==0.4.14
requests @ file:///C:/b/abs_474vaa3x9e/croot/requests_1707355619957/work
ruamel.yaml @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/ruamel.yaml_1699483184324/work
setuptools==69.2.0
six==1.16.0
SQLAlchemy==2.0.29
tqdm @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/tqdm_1701808178601/work
truststore @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/truststore_1701881385424/work
typing_extensions==4.10.0
urllib3 @ file:///C:/b/abs_4etpfrkumr/croot/urllib3_1707770616184/work
wheel==0.41.2
win-inet-pton @ file:///C:/Users/dev-admin/perseverance-python-buildout/croot/win_inet_pton_1699472992992/work
zstandard==0.19.0
this is my package

@davisking
Copy link
Owner

Don't do any of that other stuff, just do pip install dlib. That should work without issue.

@ITApeDeHao
Copy link
Author

do pip install dlib .I can't use GPU to speed up computing

@MrWhite928
Copy link

I have encountered a similar problem, but the difference is that my Python version is 3.8. Do you know how to solve it?

@ITApeDeHao
Copy link
Author

我遇到过类似的问题,但不同的是,我的Python版本是3.8。你知道怎么解决它吗?

Sorry, I have not used other versions for testing, and I only successfully compiled on one computer. After I changed the computer, this error still occurred when I used the above version. I think it may be caused by some execution error of my step.

@dlib-issue-bot
Copy link
Collaborator

Warning: this issue has been inactive for 35 days and will be automatically closed on 2024-05-27 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

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

4 participants