

macOS10.13High Sierraでpy2apでtkinterのドキュメントにある「簡単な Hello World
プログラム」をvenvで仮想環境構築をしアプリ化しようとしたところ、アプリの作成自体には成功するものの作成されたアプリを実行しようとするとエラーとなります。良い解決方法はございますでしょうか。御教授頂けましたらと思います。

macOS10.13.6 High Sierra  
Python 3.6.5  
Xcode 10.1  
command Line Tool  
`PYTHON_CONFIGURE_OPTS="--enable-framework"` オプション付きインストール

**エラー内容**

[code]

    /Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/MacOS/HelloWorld ; exit;
    MacBook-Pro:~ userName$ /Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/MacOS/HelloWorld ; exit;
    Traceback (most recent call last):
      File "/Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/Resources/__boot__.py", line 101, in <module>
        _run()
      File "/Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/Resources/__boot__.py", line 84, in _run
        exec(compile(source, path, "exec"), globals(), globals())
      File "/Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/Resources/HelloWorld.py", line 1, in <module>
        import tkinter as tk
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
      File "tkinter/__init__.pyc", line 36, in <module>
    ValueError: character U+6573552f is not in range [U+0000; U+10ffff]
    2020-06-03 15:00:57.139 HelloWorld[27708:726970] HelloWorld Error
    logout
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed. 
    
[/code]

その後、pyenv +
venvでTkinterを使うにはActiveTcl-8.5が必要だとのことで、ActiveTcl-8.5をインストール後Pythonを再インストールし再度バイナリ化をしてみたところ、_tkinter.TclError:
Can't find a usable tk.tcl in the following
directoriesというエラーメッセージへと変化しました。現状はここで止まっております。

[code]

    /Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/MacOS/HelloWorld ; exit;
    userNameMacBook-Pro:~ userName$ /Users/hisashishindo/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/MacOS/HelloWorld ; exit;
    Traceback (most recent call last):
      File "/Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/Resources/__boot__.py", line 81, in <module>
        _run()
      File "/Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/Resources/__boot__.py", line 66, in _run
        exec(compile(source, path, 'exec'), globals(), globals())
      File "/Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/Resources/HelloWorld.py", line 22, in <module>
        root = tk.Tk()
      File "tkinter/__init__.pyc", line 2020, in __init__
    _tkinter.TclError: Can't find a usable tk.tcl in the following directories: 
        /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tk8.5 /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tk8.5/Resources/Scripts /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5 /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5/Resources/Scripts /Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/lib/tk8.5 /Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/lib/tk8.5/Resources/Scripts ~/Library/Tcl/tk8.5 ~/Library/Tcl/tk8.5/Resources/Scripts /Library/Tcl/tk8.5 /Library/Tcl/tk8.5/Resources/Scripts /System/Library/Tcl/tk8.5 /System/Library/Tcl/tk8.5/Resources/Scripts ~/Library/Frameworks/tk8.5 ~/Library/Frameworks/tk8.5/Resources/Scripts /Library/Frameworks/tk8.5 /Library/Frameworks/tk8.5/Resources/Scripts /System/Library/Frameworks/tk8.5 /System/Library/Frameworks/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/tcl/lib/tk8.5 /Library/Tcl/teapot/package/tcl/lib/tk8.5/Resources/Scripts /Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/lib/tk8.5 /Users/userName/Documents/HelloWorlddocs/dist/HelloWorld.app/Contents/library
    
    
    
    This probably means that tk wasn't installed properly.
    
    2020-06-04 09:57:13.141 HelloWorld[16816:1215156] HelloWorld Error
    called Tcl_FindHashEntry on deleted table
    Abort trap: 6
    logout
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.
    
[/code]


CC BY-SA 4.0
2020-06-03T06:10:03.200
67249
2020-06-04T01:00:23.120
2020-06-04T01:00:23.120
14780
14780
question
python macos pyenv
py2app で作成したアプリを dist フォルダ内で実行するとエラーになる