0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PyInstallerコマンド

Last updated at Posted at 2025-08-20

PyInstallerコマンド

【前提条件】
・Pythonがインストールされていること
・PyInstallerがインストールされていること

1.bitbashまたはコマンドプロンプトで以下コマンド実行して確認

%pip show pyinstaller

Name: pyinstaller
    .
    .
    .
Requires: altgraph, packaging, pefile, pyinstaller-hooks-contrib, pywin32-ctypes, setuptools
Required-by:

2.インストールされていなければインストールする。
%pip install pyinstaller

【実行コマンド】
%python -m PyInstaller Pythonファイル名 -F -w

インストールしたけど PATH が通っていないとコマンドエラーになるので、
python経由(python -m PyInstaller)で実行する。
-Fは--onlineと同じ。EXEを1ファイルにする。
-wは--noconsoleと同じ。コマンドウィンドウを非表示にする。

%cd c:\sampeles
%python -m PyInstaller test.py -F -w
466 INFO: PyInstaller: 6.15.0, contrib hooks: 2025.8
    .
    .
    .
3819 INFO: Building EXE from EXE-00.toc completed successfully.
3864 INFO: Build complete! The results are available in: C:\samples\dist
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
samplesフォルダの直下にdist\ValidateCheckCSV.exeが作成される。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?