Problem
My problem is that i'm trying to use cx_Freeze
to make an exe
for my program, so I ran python setup.py build
, and the build went successfully, but when I went to run main.exe
, it gave me an error saying there is no module named text
. My text.py
file is located inside my classes folder. Also I'm using python version: 3.6.1
main.py
import sys
import pygame
import os
os.getcwd()
sys.path.append('classes/')
from text import *
from image import *
from player import *
from ball import *
from title import *
from cloud import *
from universal import *
setup.py
import sys
from cx_Freeze import setup, Executable
build_exe_options = {"packages": ["sys", "pygame"], "excludes": ["tkinter"]}
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(
name = "Pong",
version = "1.0",
description = "2 player pong",
options = {"build_exe": build_exe_options},
executables = [
Executable("main.py", base = base)
],
)