我的目标是运行tensorflow对象检测API,并遵循安装中的步骤。
我安装了tensorflow对象检测API和协议。我还添加了到protobuf的路径。但是会出现以下错误:
ImportError: cannot import name 'string_int_label_map_pb2'
已安装protobuf:
%%bash
cd models/research
protoc object_detection/protos/*.proto --python_out=.
包含错误导入语句的代码块:
from object_detection.utils import o
我正在尝试使用PyAutoGUI库,我得到了这个错误ModuleNotFoundError: No module named 'Xlib'。我已经尝试了sudo apt-get install python-xlib,pip3 install xlib和我找到的所有安装命令,但都没有效果。
这是我得到的错误
File "/root/.../_pyautogui_x11.py", line 7, in <module>
from Xlib.display import Display
ModuleNotFoundError: No module nam
如果使用as在python中创建别名,如
import tensorflow as tf
为什么不能使用相同的别名导入
import tensorflow as tf
from tf import keras
给我一个错误
ModuleNotFoundError: No module named 'tf'
在python控制台中,我可以运行:
from random import randint
但我跑的时候出错了:
import random.randint
错误说:
ModuleNotFoundError: No module named 'random.randint'; 'random' is not a package
我以为这两个导入语句是同义的。也许我漏掉了什么?
我试图导入以下模块
from fastai.nlp import *
from fastai.model import Stepper
但是,我得到以下错误
ModuleNotFoundError: No module named 'fastai.nlp'
ModuleNotFoundError: No module named 'fastai.model'
我已经安装了pip install fastai。
提前谢谢你的帮助。
嗨,我是蟒蛇的新手,我会在这方面再看一双眼睛。我目前正在重构一个项目,以使其可扩展。
当试图从位于不同包中的模块导入名为IrishTimesEventHandler的对象时,interperter在IrishTimesEventHandler中遇到一个错误:
from alexaevents.irish_times_event_handler import IrishTimesEventHandler
ModuleNotFoundError: No module named 'alexaevents.irish_times_event_handler'
听到的是我的目录的一个快
为了更好地理解matplotlib的结构,我正在玩matplotlib,下面的代码使我感到困惑:
import matplotlib as mpl
from mpl import pyplot as plt # ModuleNotFoundError : No module named 'mpl'
mpl.pyplot # AttributeError: module 'matplotlib' has no attribute 'pyplot'
另一方面,如果我不使用matplotlib as导入不同的名称,而是执行
import matplot
我有一个关于项目结构的问题。我有所有的文件在主工程包中。我想创建三个包和独立的文件。
当我这样做的时候,我得到了一个错误:
Traceback (most recent call last): File "file.py", line 5, in <module>
from script.login import LoginTest
ModuleNotFoundError: No module named 'script'
我查过了,可能是关于翻译的。我已经根据指南进行了更正,并继续这样做。