Python Module NotFoundError: I have a question about the error No module named

Asked 1 years ago, Updated 1 years ago, 74 views

After designing with the designer among anaconda, I saved the ui file in the lib folder and ran it on main.py, and it says there is no module. Why is that?

# -*- coding: utf-8 -*-
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QUrl
from lib.extractWordLayout import Ui_MainWindow
from PyQt5.QtWidgets import *
from PyQt5 import QtCore
from bs4 import BeautifulSoup
import urllib.request as request
import urllib.error as err
import urllib.parse as parse
import datetime
import codecs
import time
import sys
import io
import os

python error guideline

2022-09-22 08:16

1 Answers

Create a _init__.py file in the lib directory

The _init__.py file must exist to recognize it as a package.

It doesn't matter if it's a blank (empty) file.


2022-09-22 08:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.