cx_Freeze를 사용하여 tkinter 및 selenium을 포함한 독립 실행 형 Python3 macOS 응용 프로그램을 만들려고합니다. 내 프로젝트에서 세 개의 파일이 있습니다macOS 응용 프로그램을 만들기위한 cx_Freeze 인코딩
tkinter_tab3.py
(포함 GUI)는user.txt
는ver004.py
(사용자 정보 포함) (tkinter_tab3.py
에서 호출 및 실행 작업)
나는 다음을 생성 tkinter_tab3.py
이 실행 파일로 변환되는 파일 인 setup.py
파일 :
$python3 setup.py build
를 실행할 때
, 나는 터미널에서 다시이 오류가 나타납니다 또한
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
, 내가 $python3 setup.py bdist.mac
과 $python3 setup.py bdist.dmg
, 나는 다음과 같은 오류가 발생합니다 실행할 때 :
build/suprbotcho-1.0.app/Contents/MacOS/lib/numpy/core/lib/libnpymath.a(npy_math.o):
error: can't copy 'build/suprbotcho-1.0.app/Contents/MacOS/lib/numpy/core/lib/libnpymath.a(npy_math.o):': doesn't exist or not a regular file
encodings
문제에 대한 다른 게시물을 읽었으므로 어디에서 잘못 되었는가를 잘 모르겠지만 게시 된 솔루션을 사용해 본 후에는 아무런 진전도 없었습니다. 여기
tkinter_tab3.py
from tkinter import *
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select, WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import numpy as np
import time
from datetime import datetime
from threading import Timer
from ver004 import SuPrBoTcHo, InIt_UsEr
ver004.py
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select, WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import numpy as np
import time
from datetime import datetime
from threading import Timer
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import NoSuchElementException
, 그것은 좋은 것입니다. 특별한 질문이 있으시면 언제든지 알려주십시오.
(파이썬 버전 : 3.6.3)
감사를 수행 최신 버전으로 cxfreeze을 업그레이드했다 @Alexan –