[英]Import Error on conda even directory exists
Environment info: Anaconda
, windows7x64
, py3.5
环境信息:
Anaconda
, windows7x64
, py3.5
I setup a virtual env named as menpo
to run menpoproject
. 我设置了一个名为
menpo
的虚拟menpo
来运行menpoproject
。 For a long time I was using load_dlib_frontal_face_detector
smoothly. 很长时间以来,我一直
load_dlib_frontal_face_detector
平稳地使用load_dlib_frontal_face_detector
。 After tinkering with a pip-install dlib
command accidentally on virtualenv (I mean via Anaconda Prompt menpo
) , I couldn't get my code working due to an "ImportError" ImportError: cannot import name' load_dlib_frontal_face_detector'
. 在virtualenv上偶然修改了
pip-install dlib
命令后(我的意思是通过Anaconda Prompt menpo
),由于出现“ ImportError” ImportError: cannot import name' load_dlib_frontal_face_detector'
,我无法使代码正常工作ImportError: cannot import name' load_dlib_frontal_face_detector'
。 Code is like below: 代码如下:
import cv2
import menpo.io as mio
import menpodetect
Throws error at line 3. There is this guy seems to had a similar issue. 在第3行抛出错误。似乎这个人有类似的问题。 https://github.com/menpo/menpodetect/issues/15
https://github.com/menpo/menpodetect/issues/15
I did all the 我做了所有
conda remove dlib -y
pip uninstall dlib
conda install -c conda-forge dlib
stuff but still got the same error. 东西,但仍然有相同的错误。 Besides that;
除此之外;
Uninstalled Anaconda completely 完全卸载Anaconda
Removed all Python folders wherever I found. 删除所有找到的Python文件夹。
Installed Anaconda and setup a new menpo virtual env and still no luck. 安装了Anaconda并设置了一个新的menpo虚拟环境,但仍然没有运气。 It seems like this dlib installation I made causing some issues.
看来我进行的这种dlib安装引起了一些问题。 BTW,
conda list
produces dlib 18.18 py35_2 menpo
and there is no pip
line as mentioned in the link given above. 顺便说一句,
dlib 18.18 py35_2 menpo
conda list
产生dlib 18.18 py35_2 menpo
并且上面链接中没有提到pip
行。
Wrong alarm. 错误的警报。 Seems that I've named my py file as menpodetect which I shouldn't do.
似乎我已将py文件命名为menpodetect,我不应该这样做。 Problem solved.
问题解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.