Help regarding building cv2 based package #2168
Closed
coder-maddy
started this conversation in
General
Replies: 2 comments 2 replies
-
Whats changed in your code? Any new import? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello folks,
I am trying to build a project with cx_freeze 6.15.11. My project depends on opencv-python 4.8.1.78.
Till yesterday it was building fine, but from today I am getting an error while building.
Error:
AttributeError: module 'cv2.gapi.wip' has no attribute '__path__'. Did you mean: '__name__'?
Here is my setup script.
`
import sys
from cx_Freeze import setup, Executable
import os
import cv2
base = 'console'
executables = [
Executable(
script="app.py",
base=base,
copyright='Copyright (C) 2023 Nexus Tech Innovation Pvt Ltd',
shortcut_name="NexusStreamingServer",
shortcut_dir="DesktopFolder",
)
]
data_files = [
("templates/", "templates/"),
("static/models", "static/models"),
("config/", "config/"),
("logs/", "logs/")
]
packages = ["os", "sys"]
build_options = {
"packages": packages,
"excludes": [],
"includes": [
"jinja2",
"jinja2.ext",
"pathlib",
"flask",
"cv2",
"matplotlib",
"pytesseract",
"pkg_resources",
"hikvisionapi"
],
"include_files": data_files,
"include_msvcr": True
}
directory_table = [
("ProgramMenuFolder", "TARGETDIR", "."),
("MyProgramMenu", "ProgramMenuFolder", "MYPROG~1|My Program"),
]
msi_data = {
"Directory": directory_table,
"ProgId": [
("Prog.Id", None, None, "This is a description", "IconId", None),
],
"Icon": [
("IconId", "icon.ico"),
],
}
bdist_msi_options = {
"add_to_path": False,
"all_users": True,
"data": msi_data,
"environment_variables": [
("NexusStreamingServer", "=-*MYAPP_VAR", "1", "TARGETDIR")
],
"summary_data": {
"author": "Nexus Tech",
"comments": "This is a server application for streaming live IP cameras",
"keywords": "Streaming Nexus",
},
"upgrade_code": "{df4cb8b0-2124-4a8d-be3b-31b572e7ef63}",
}
setup(
name ="Nexus Streaming Server",
version = "1.0",
description = "Streaming server",
options = {
"build_exe": build_options,
"bdist_msi": bdist_msi_options,
},
executables = executables
)
`
Any help regarding this will be great help.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions