简体   繁体   English

如何在 anaconda spyder 5 上安装“util”

[英]How to install "util" on anaconda spyder 5

I'm trying to execute this code below:我正在尝试在下面执行此代码:

from util import  testDlibFaceDetector, saveFaces_hogFaceDetector

# choose method to detect faces: HAAR Cascade or HOG algorithm
if __name__ == '__main__':
    # testFaceRecognitionAlgorithm() #HAAR Cascade
    # testDlibFaceDetector() # HOG
    # saveFaces()
    saveFaces_hogFaceDetector()

but in everytime I get the same result which is:但每次我得到相同的结果是:

runfile('E:/code pfe/liveness-master/4_liveness net/untitled0.py', wdir='E:/code pfe/liveness-master/4_liveness net')
Traceback (most recent call last):

  File "E:\code pfe\liveness-master\4_liveness net\untitled0.py", line 8, in <module>
    import util

ModuleNotFoundError: No module named 'util'

sp please can you show me how to install it correctly, I found the git clone method but I didn't find it useful for me. sp 请你告诉我如何正确安装它,我找到了 git 克隆方法,但我没有发现它对我有用。

To avoid installing util , you need to place the file that imports it in the same directory where util is.为了避免安装util ,您需要将导入它的文件放在util所在的同一目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM