简体   繁体   English

甚至在目录上存在conda上的导入错误

[英]Import Error on conda even directory exists

Environment info: Anaconda , windows7x64 , py3.5 环境信息: Anacondawindows7x64py3.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.

相关问题 Mac - 导入请求错误 - 请求模块存在 - Mac - import requests error - requests module exists 即使正确安装,导入包也会出错 - Import package error even though it is properly installed 即使存在依赖项,导入错误 - Import error even though dependencies exist 尝试从同一目录导入 ipynb 文件时出现导入错误 - Import error when trying to import a ipynb file from the same directory 从python中的不同目录导入错误(Err - No module named app) - Import error from different directory in python (Err - No module named app) VS Code pylint(import-error)“无法导入”自定义目录中的子模块 - VS Code pylint(import-error) "Unable to import" subsub-module from custom directory 使用 conda 和 poppler、Windows 10 安装后无法导入 pdftotext - Unable to import pdftotext after installing with conda and poppler, Windows 10 jupyter notebook (macOS) 中的 %conda list biopython 错误 - Error in %conda list biopython in jupyter notebook (macOS) 即使 Python 模块存在于路径中,也找不到它 - Python module not found even when it exists in the path 当我导入一个“ .so”文件并且该文件在python中可用时,错误“没有这样的文件或目录” - Error “No such file or directory” when i import a “.so” file and that file is available in python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM