简体   繁体   中英

Python - TensorFlow - ModuleNotFoundError: No module named x

I'm trying to run a TensorFlow program using python3.6 but I'm facing this error:

ModuleNotFoundError: No module named 'tensorflow.python.pywrap_tensorflow_internal'

I found out that I should run the script from another directory, other than the TensorFlow's. However, when I ran the script in the terminal from another directory I get this error:

line x: from models.object_detection.utils import dataset_util

ModuleNotFoundError: No module named 'models'

Moreover, here is my directory looks like:

    - root
        - models
        .    - object_detection
        .    .    - utils
        .         .   + dataset_util.py
        - my_folder
        .    + my_file.py

How can I solve the issue?

Thanks.

当我在没有显卡的计算机上运行tensorflow-gpu而不是在Windows上运行tensorflow时收到此错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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