2017-12-12 8 views
7

cx_Freezeを使用してtkinterとseleniumを含むスタンドアロンのPython3 macOSアプリケーションを作成しようとしています。macOSアプリケーションを作成するためのcx_Freezeエンコーディング

  • tkinter_tab3.py(GUIが含まれています)
  • user.txt(ユーザー情報が含まれています)
  • ver004.pytkinter_tab3.pyから呼び出されたタスクを実行)

私は次のように作成しました:私のプロジェクトでの3つのファイルがあります。 setup.pyファイルtkinter_tab3.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問題についての他の記事を読んだので、私は私が間違っているつもりかを理解していない、しかし私は、投稿のソリューションを試した後、何の進展は見られませんでした。ここで

は、それぞれPythonのファイルを輸入している:私は、この特定の問題を修正上の助けを得ることができれば

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 

、それは素晴らしいことです。特にご質問がありましたら、お気軽にお知らせください。

(pythonバージョン:3.6.3)

答えて

4

私は同じ問題がありました。

ソリューションはすなわち、編集のために、以下のsteps-

pip install -U cx_Freeze==6.0.b1 
+0

感謝を行い、最新バージョンにcxfreezeをアップグレードした@Alexan –

関連する問題