1
DLIB我这里的操作说明:按行http://www.pyimagesearch.com/2017/03/27/how-to-install-dlib/无法安装在Mac OS X
线,除了为安装python3行。我做了一个虚拟环境和内部的virtualenv,做这几行字:
$ pip install numpy
$ pip install scipy
$ pip install scikit-image
$ pip install dlib
不像指令,最后一行花了几秒钟,而不是15分钟。安装完毕后,我打开ipython
,并试图import dlib
,并且收到此消息:
----> 1 from .dlib import *
2 __version__ = "19.4.0"
ImportError: dlopen(/Users/myname/Documents/camera-project/code/story-board/cv/lib/python2.7/site-packages/dlib/dlib.so, 2): Library not loaded: @rpath/libmkl_rt.dylib
Referenced from: /Users/myname/Documents/camera-project/code/story-board/cv/lib/python2.7/site-packages/dlib/dlib.so
Reason: image not found
我认为这意味着dlib
安装不正确,但我不知道我做错了什么?
此外,我应该补充一点,我没有我的mac上的anaconda
,所以它不是问题。然而,今天早些时候我做了,我可以加载dlib
没有问题,大概是因为我运行的是由anaconda
分发的python版本,我假设dlib
附带anaconda
。但anaconda
分发的X11
已损坏,因此我必须从我的系统中完全删除anaconda
并重新开始。
编辑
这是安装DLIB “成功” 后,我得到消息:
:/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Installing collected packages: dlib
Successfully installed dlib-19.4.0
我已经安装了安装CMake'cmake'尽管如此,还有助推。和boost-python – chibro2
你在你的virtualenv中安装了cmake吗?当您尝试运行pip install dlib时,是否还有任何错误?或者它看起来是否安装得很快? – cosinepenguin
不,我在virtualenv之外安装'cmake,boost,boost-python'。我安装好dlib,它安装得非常快。我编辑了上面的问题以获得快速安装后获得的消息。 – chibro2