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

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

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

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

PyInstaller

PyInstallerは、Pythonのスクリプトを一括でWindowsなどで動く実行可能ファイルに変換できるツールです。このツールを用いることで自作のPythonプログラムを別で使用する場合でもPythonをインストールする必要がありません。

Python 3.x

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

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

4回答

6239閲覧

【Python】pyinstallerをインストールできない(初心者です)

-m_pip

総合スコア0

Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

PyInstaller

PyInstallerは、Pythonのスクリプトを一括でWindowsなどで動く実行可能ファイルに変換できるツールです。このツールを用いることで自作のPythonプログラムを別で使用する場合でもPythonをインストールする必要がありません。

Python 3.x

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

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2020/08/21 08:29

編集2022/01/12 10:55

実現したいこと

Pyinstallerをインストールし、プログラムをexe化したい。
(今のところインストール中にエラーが出る)

環境

Windows10
Python3.8.5 embeddable版

発生している問題・エラーメッセージ

embeddable版のため、pipでのインストールでは、「python -m pip install pyinstaller」
で行っています。

Python

1C:\Users\take\Desktop\take\python>python -m pip install pyinstaller 2Collecting pyinstaller 3 Using cached pyinstaller-4.0.tar.gz (3.5 MB) 4 Installing build dependencies ... done 5 Getting requirements to build wheel ... done 6 Preparing wheel metadata ... done 7Requirement already satisfied: setuptools in c:\users\take\desktop\take\python\lib\site-packages (from pyinstaller) (49.3.1) 8Collecting pywin32-ctypes>=0.2.0; sys_platform == "win32" 9 Using cached pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB) 10Collecting pyinstaller-hooks-contrib>=2020.6 11 Using cached pyinstaller_hooks_contrib-2020.7-py2.py3-none-any.whl (152 kB) 12Collecting pefile>=2017.8.1; sys_platform == "win32" 13 Using cached pefile-2019.4.18.tar.gz (62 kB) 14Collecting altgraph 15 Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB) 16Collecting future 17 Using cached future-0.18.2.tar.gz (829 kB) 18 ERROR: Command errored out with exit status 1: 19 command: 'C:\Users\take\Desktop\take\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\take\AppData\Local\Temp\pip-install-0c1hi24s\future\setup.py'"'"'; __file__='"'"'C:\Users\take\AppData\Local\Temp\pip-install-0c1hi24s\future\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\take\AppData\Local\Temp\pip-pip-egg-info-vudtf198' 20 cwd: C:\Users\take\AppData\Local\Temp\pip-install-0c1hi24s\future\ 21 Complete output (5 lines): 22 Traceback (most recent call last): 23 File "<string>", line 1, in <module> 24 File "C:\Users\take\AppData\Local\Temp\pip-install-0c1hi24s\future\setup.py", line 86, in <module> 25 import src.future 26 ModuleNotFoundError: No module named 'src' 27 ---------------------------------------- 28ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

よく分からないけど'src'をインストールしてみた

するとこれもエラー

Python

1C:\Users\take\Desktop\take\python>python -m pip install src 2Collecting src 3 Using cached src-0.0.7.zip (6.3 kB) 4Building wheels for collected packages: src 5 Building wheel for src (setup.py) ... error 6 ERROR: Command errored out with exit status 1: 7 command: 'C:\Users\take\Desktop\take\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\setup.py'"'"'; __file__='"'"'C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\take\AppData\Local\Temp\pip-wheel-b_j3zn0m' 8 cwd: C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\ 9 Complete output (34 lines): 10 running bdist_wheel 11 running build 12 running build_py 13 creating build 14 creating build\lib 15 creating build\lib\src 16 copying src\__init__.py -> build\lib\src 17 running egg_info 18 writing src.egg-info\PKG-INFO 19 writing dependency_links to src.egg-info\dependency_links.txt 20 writing entry points to src.egg-info\entry_points.txt 21 writing requirements to src.egg-info\requires.txt 22 writing top-level names to src.egg-info\top_level.txt 23 reading manifest file 'src.egg-info\SOURCES.txt' 24 reading manifest template 'MANIFEST.in' 25 writing manifest file 'src.egg-info\SOURCES.txt' 26 Traceback (most recent call last): 27 File "<string>", line 1, in <module> 28 File "C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\setup.py", line 70, in <module> 29 setup( 30 File "C:\Users\take\Desktop\take\python\lib\site-packages\setuptools\__init__.py", line 163, in setup 31 return distutils.core.setup(**attrs) 32 File "distutils\core.py", line 148, in setup 33 File "distutils\dist.py", line 966, in run_commands 34 File "distutils\dist.py", line 985, in run_command 35 File "C:\Users\take\Desktop\take\python\lib\site-packages\wheel\bdist_wheel.py", line 225, in run 36 install = self.reinitialize_command('install', 37 File "C:\Users\take\Desktop\take\python\lib\site-packages\setuptools\__init__.py", line 217, in reinitialize_command 38 cmd = _Command.reinitialize_command(self, command, reinit_subcommands) 39 File "distutils\cmd.py", line 305, in reinitialize_command 40 File "distutils\dist.py", line 950, in reinitialize_command 41 File "distutils\cmd.py", line 324, in get_sub_commands 42 File "distutils\command\install.py", line 631, in has_lib 43 AttributeError: 'NoneType' object has no attribute 'has_pure_modules' 44 ---------------------------------------- 45 ERROR: Failed building wheel for src 46 Running setup.py clean for src 47Failed to build src 48DEPRECATION: Could not build wheels for src which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368. 49Installing collected packages: src 50 Running setup.py install for src ... error 51 ERROR: Command errored out with exit status 1: 52 command: 'C:\Users\take\Desktop\take\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\setup.py'"'"'; __file__='"'"'C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\take\AppData\Local\Temp\pip-record-cybouees\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\take\Desktop\take\python\Include\src' 53 cwd: C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\ 54 Complete output (2 lines): 55 running install 56 You've probably made a mistake here and are trying to install from a 'src' directory which doesn't exist. 57 ---------------------------------------- 58ERROR: Command errored out with exit status 1: 'C:\Users\take\Desktop\take\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\setup.py'"'"'; __file__='"'"'C:\Users\take\AppData\Local\Temp\pip-install-davsibvc\src\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\take\AppData\Local\Temp\pip-record-cybouees\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\take\Desktop\take\python\Include\src' Check the logs for full command output.

試したこと

「pip」を「pip3」、「python」を「python3」に置き換えてもダメでした

エラーの正体、解決方法は何でしょうか?

色々調べてみたけど当てはまらなかったのでこちらで質問させていただきました。
エラーの正体、または解決方法が分かる方、ぜひ回答よろしくお願いします!

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

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

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

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

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

guest

回答4

0

C:\Users\take\Desktop\take\python\python.exe

これ毎回フルパス指定で実行していますか。
単にpython.exeで実行するならpathへの
登録が無いとダメですよ。

投稿2020/09/20 18:22

hana_yama_san

総合スコア923

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

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

0

同じ症状で、以下にて解決しました。

  1. PyPiのサイトからfutureモジュールの最新版をDL
  2. 落としたfutureを解凍
  3. setup.pyのimport sys の後の行に、以下を追記
sys.path.add("")
  1. pip install <path_to_future>
  2. pip install pyinstaller

不思議でしたが、私はこれで解決しました。
ご参考になれば幸いです。

投稿2020/09/20 18:04

yamahubuki

総合スコア13

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

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

0

python と打つと何が起動しますか?
もし、Python2系が起動してしまう場合、
python3 -m pip install pyinstaller
としてみてください

投稿2020/08/21 08:47

Luke02561

総合スコア404

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

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

-m_pip

2020/08/21 08:51

しっかり3系が起動します… ちなみに python3 -m pip install pyinstaller だと何も起こりませんでした…
guest

0

pipの代わりにpip3で実行してみてはいかがですか?

投稿2020/08/21 08:36

suzumushi

総合スコア4

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

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

-m_pip

2020/08/21 08:39

実行しました C:\Users\take\Desktop\take\python\python.exe: No module named pip3 pip3が無いらしいです。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問