[英]installed face_recognition, but cannot import. (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
There was no problem importing face_recognition yesterday but all of sudden it does not work. 昨天导入face_recognition没有问题,但突然间它不起作用。 I have no idea how to fix this problem... Any assistance would be highly appreciated. 我不知道如何解决这个问题......任何帮助都将受到高度赞赏。
I restarted my mac and tried again now it works fine. 我重新启动我的mac并再次尝试它现在工作正常。 I would like to figure out why... 我想弄明白为什么......
>>> import dlib
>>> import face_recognition
>>>
Please import sys by import sys
. 请通过import sys
。
Then replace 然后更换
np.set_printoptions(threshold=np.nan)
with 同
np.set_printoptions(threshold=sys.maxsize)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.