python - 导入错误 : No module named 'utils'

标签 python tensorflow import anaconda python-module

安装 Tensorflow 后,当我尝试运行我的代码时出现单个导入错误

from utils import *
Traceback (most recent call last):

  File "<ipython-input-1-b81aa0fdb889>", line 1, in <module>
    from utils import *

ImportError: No module named 'utils'

虽然我都试过了

conda install -c conda-forge python-utils 
conda install -c conda-forge/label/gcc7 python-utils

如果我查看 Anaconda Navigator 的环境,似乎已安装 python-utils 包。

我的环境:macOS Mojave 10.14 + Tensorflow 1.12.0 + Python 3.5.6。

非常感谢任何帮助。

最佳答案

你试过吗

from python_utils import *

python-utils documentation 中是这么说的

关于python - 导入错误 : No module named 'utils' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53819953/

相关文章:

machine-learning - 几个批处理的 TensorFlow 平均梯度

Python导入文本文件,其中每一行都有不同的列数

python - 使用 Python OpenCV cv2.VideoCapture() 直接读取灰度视频帧

python - 将 TensorFlow Checkpoint 部署到 Google Cloud Platform

Python 特征向量

python - Tensorflow 多 GPU 示例错误 : Variable conv1/weights/ExponentialMovingAverage/does not exist

ios - 导入 swift iOS 项目到另一个项目

在 Intellij 中构建工件后,Java getResource 找不到文件

python - 散点图中两个特征之间的比例

python - 高效地从 pandas DataFrame 创建一系列元组