安装了face_recognition,但无法导入.(Python3.64) [英] installed face_recognition, but cannot import. (Python3.64)
本文介绍了安装了face_recognition,但无法导入.(Python3.64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
>>> import face_recognition
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/username/Desktop/face_recognition_low/face_recognition.py", line 30, in <module>
np.set_printoptions(threshold=np.nan)
File "/Users/username/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/arrayprint.py", line 246, in set_printoptions
floatmode, legacy)
File "/Users/username/.virtualenvs/cv/lib/python3.6/site-packages/numpy/core/arrayprint.py", line 93, in _make_options_dict
raise ValueError("threshold must be numeric and non-NAN, try "
ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation
昨天导入face_recognition没问题,但是突然间它不起作用.我不知道如何解决此问题...任何帮助将不胜感激.
There was no problem importing face_recognition yesterday but all of sudden it does not work. I have no idea how to fix this problem... Any assistance would be highly appreciated.
我重新启动了Mac,现在再次尝试可以正常工作.我想弄清楚为什么...
I restarted my mac and tried again now it works fine. I would like to figure out why...
>>> import dlib
>>> import face_recognition
>>>
推荐答案
请通过 import sys
导入sys.
然后替换
np.set_printoptions(threshold = np.nan)
使用
np.set_printoptions(threshold = sys.maxsize)
这篇关于安装了face_recognition,但无法导入.(Python3.64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文