简体   繁体   English

ImportError:没有名为“ libs.utils”的模块

[英]ImportError: No module named 'libs.utils'

Using: python 3.5.2, tensorflow gpu 0.12.0 使用: python 3.5.2, tensorflow gpu 0.12.0

I am trying to run code for Autoencoders from here . 我试图从这里运行Autoencoders的代码。 In the code snippet it asked to import a library which has a function corrupt(x) . 在代码片段中,它要求导入一个具有函数corrupt(x) To use this I am trying to import from libs.utils import corrupt but then I get error ImportError: No module named 'libs.utils' 要使用此功能,我尝试from libs.utils import corruptfrom libs.utils import corrupt但随后出现错误ImportError: No module named 'libs.utils'

How can I resolve this in Windows? 如何在Windows中解决此问题?

In the folder C:\\Users\\raady\\AppData\\Local\\Programs\\Python\\Python35\\libs I have 4 files: _tkinter.lib, libpython35.a, python3.lib, python35.lib . 在文件夹C:\\Users\\raady\\AppData\\Local\\Programs\\Python\\Python35\\libs我有4个文件: _tkinter.lib, libpython35.a, python3.lib, python35.lib

In the folder C:\\Users\\raady\\AppData\\Local\\Programs\\Python\\Python35\\Lib I don't have any folder libs. 在文件夹C:\\Users\\raady\\AppData\\Local\\Programs\\Python\\Python35\\Lib我没有任何文件夹库。

To import this library to workspace, what should I install? 要将这个库导入工作区,我应该安装什么?

See here . 这里 It's the Github repo from where you found the example. 这是您在其中找到示例的Github存储库。 You need to download the whole directory or at least the libs directory in order to access the libs.utils module. 您需要下载整个目录或至少下载libs目录才能访问libs.utils模块。

If you download the libs directory separately make sure you put it in the same directory as your example Tensorflow script. 如果单独下载libs目录,请确保将其与示例Tensorflow脚本放在同一目录中。

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

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