webmaster-kazu.com

テクノロジー・データ分析・実践ログ・その他

Pythonに「pyinstaller」をインストールする(Windows10)

カテゴリ: Python【初歩から現場実務的なもの】

Pythonに「pyinstaller」をインストールする(Windows10)

■Python

今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)

■lxmlをインストールする

lxmlモジュールのインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install pyinstaller

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、pipを使う場合にはコマンドでの切り替えます。

py -3.8 -m pip install pyinstaller

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Collecting pyinstaller

Downloading pyinstaller-4.1.tar.gz (3.5 MB)

|████████████████████████████████| 3.5 MB 3.3 MB/s

Installing build dependencies ... done

Getting requirements to build wheel ... done

Preparing wheel metadata ... done

Collecting altgraph

Downloading altgraph-0.17-py2.py3-none-any.whl (21 kB)

Collecting pefile>=2017.8.1; sys_platform == "win32"

Downloading pefile-2019.4.18.tar.gz (62 kB)

|████████████████████████████████| 62 kB 364 kB/s

Collecting pywin32-ctypes>=0.2.0; sys_platform == "win32"

Downloading pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB)

Requirement already satisfied: setuptools in c:\users\user\appdata\roaming\python\python38\site-packages (from pyinstaller) (50.3.2)

Collecting pyinstaller-hooks-contrib>=2020.6

Downloading pyinstaller_hooks_contrib-2020.10-py2.py3-none-any.whl (166 kB)

|████████████████████████████████| 166 kB 3.3 MB/s

Collecting future

Downloading future-0.18.2.tar.gz (829 kB)

|████████████████████████████████| 829 kB 3.2 MB/s

Using legacy 'setup.py install' for pefile, since package 'wheel' is not installed.

Using legacy 'setup.py install' for future, since package 'wheel' is not installed.

Building wheels for collected packages: pyinstaller

Building wheel for pyinstaller (PEP 517) ... done

Created wheel for pyinstaller: filename=pyinstaller-4.1-py3-none-any.whl size=2790254 sha256=7286f4c65cb08354768ebbd68555b223ca4120be7372c0361e222ea8a9f3e5b4

Stored in directory: c:\users\user\appdata\local\pip\cache\wheels\ae\7a\1e\e42202ec16f036e6c25592c6bc63d3c26e6a6addd6a25f053a

Successfully built pyinstaller

Installing collected packages: altgraph, future, pefile, pywin32-ctypes, pyinstaller-hooks-contrib, pyinstaller

Running setup.py install for future ... done

Running setup.py install for pefile ... done

Successfully installed altgraph-0.17 future-0.18.2 pefile-2019.4.18 pyinstaller-4.1 pyinstaller-hooks-contrib-2020.10 pywin32-ctypes-0.2.0

Enterキーを押すと、インストールが開始され、「Successfully installed」と表示されます。これが表示されれば、正常にpyinstallerのインストールの完了となります。