質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Kivy

Kivyは、Pythonを用いたNUI開発のためのオープンソースフレームワーク。マルチタッチなど多くの入力に対応したNUIアプリなどを開発することができます。多くの環境で動作するクロスプラットフォームです。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

解決済

1回答

542閲覧

Python Kivyで作製したプログラムをPyInstallerでexeファイル化できない

shut9

総合スコア14

Kivy

Kivyは、Pythonを用いたNUI開発のためのオープンソースフレームワーク。マルチタッチなど多くの入力に対応したNUIアプリなどを開発することができます。多くの環境で動作するクロスプラットフォームです。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

0クリップ

投稿2018/10/31 19:18

発生している問題

Python Kivyで作製したプログラムを、PyInstallerを用いてexeファイル化しようとしています。
以下のサイトをそのまま試しましたが、次のようなエラーが出てしまい、exeファイルが作れずにいます。
https://www.closetoyou.jp/kivy/introduction-to-kivy16/
原因をご存知の方はご回答宜しくお願いいたします。

エラーメッセージ

shu:~/GoogleDrive/gui $ PyInstaller --name expense --onefile --noconsole main.py [省略] 45341 ERROR: Can not find path @executable_path/webp (needed by /Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/kivy/core/clipboard/../../.dylibs/SDL2_image) 46036 INFO: Looking for eggs 46037 INFO: Python library not in binary dependencies. Doing additional searching... Traceback (most recent call last): 46043 WARNING: stderr: Traceback (most recent call last): File "/Users/shu/.pyenv/versions/TensorFlow/bin/PyInstaller", line 11, in <module> 46046 WARNING: stderr: File "/Users/shu/.pyenv/versions/TensorFlow/bin/PyInstaller", line 11, in <module> sys.exit(run()) 46049 WARNING: stderr: sys.exit(run()) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run 46049 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) 46053 WARNING: stderr: run_build(pyi_config, spec_file, **vars(args)) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build 46054 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) 46054 WARNING: stderr: PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 838, in main 46055 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 838, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) 46059 WARNING: stderr: build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 784, in build 46060 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 784, in build exec(text, spec_namespace) 46061 WARNING: stderr: exec(text, spec_namespace) File "<string>", line 17, in <module> 46061 WARNING: stderr: File "<string>", line 17, in <module> File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 241, in __init__ 46062 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 241, in __init__ self.__postinit__() 46063 WARNING: stderr: self.__postinit__() File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__ 46064 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__ self.assemble() 46067 WARNING: stderr: self.assemble() File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 573, in assemble 46067 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 573, in assemble self._check_python_library(self.binaries) 46068 WARNING: stderr: self._check_python_library(self.binaries) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 676, in _check_python_library 46068 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 676, in _check_python_library raise IOError(msg) 46070 WARNING: stderr: raise IOError(msg) OSError: Python library not found: libpython3.6m.dylib, libpython3.6.dylib, Python, .Python 46070 WARNING: stderr: OSError: Python library not found: libpython3.6m.dylib, libpython3.6.dylib, Python, .Python This would mean your Python installation doesn't come with proper library files. 46070 WARNING: stderr: This would mean your Python installation doesn't come with proper library files. This usually happens by missing development package, or unsuitable build parameters of Python installation. 46071 WARNING: stderr: This usually happens by missing development package, or unsuitable build parameters of Python installation. 46071 WARNING: stderr: * On Debian/Ubuntu, you would need to install Python development packages 46071 WARNING: stderr: * On Debian/Ubuntu, you would need to install Python development packages * apt-get install python3-dev 46071 WARNING: stderr: * apt-get install python3-dev * apt-get install python-dev 46072 WARNING: stderr: * apt-get install python-dev * If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin) 46072 WARNING: stderr: * If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin) 46073 WARNING: stderr:
shu:~/GoogleDrive/gui $ PyInstaller expense.spec [省略] Traceback (most recent call last): 454 WARNING: stderr: Traceback (most recent call last): File "/Users/shu/.pyenv/versions/TensorFlow/bin/PyInstaller", line 11, in <module> 454 WARNING: stderr: File "/Users/shu/.pyenv/versions/TensorFlow/bin/PyInstaller", line 11, in <module> sys.exit(run()) 455 WARNING: stderr: sys.exit(run()) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run 455 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) 456 WARNING: stderr: run_build(pyi_config, spec_file, **vars(args)) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build 456 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) 457 WARNING: stderr: PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 838, in main 457 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 838, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) 458 WARNING: stderr: build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 784, in build 458 WARNING: stderr: File "/Users/shu/.pyenv/versions/3.6.1/envs/tensorflow/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 784, in build exec(text, spec_namespace) 459 WARNING: stderr: exec(text, spec_namespace) File "<string>", line 2, in <module> 459 WARNING: stderr: File "<string>", line 2, in <module> ImportError: cannot import name 'sdl2' 459 WARNING: stderr: ImportError: cannot import name 'sdl2'

環境

MacBook Pro 2018 (macOS High Sierra 10.13.6)
pyenv 1.2.7
Python 3.6.1
Cython 0.28.5
Kivy 1.10.1
PyInstaller 3.4

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

こちらが参考になるかと思いますので、一読されてみるとよいかと思います。

https://github.com/kivy/kivy/issues/4097

投稿2018/11/01 13:59

dario_okazaki

総合スコア282

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問