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?

More than 1 year has passed since last update.

「No module named PyInstaller」の対処法

Posted at

前置き

いつも通りPyinstallerを実行すると、

「ModuleNotFoundError: No module named 'PyInstaller'」

と、このようなエラーがいきなり発生しました。
コマンドプロンプトで「pyinstaller -v」とバージョン確認を行っても同様のエラーです。
エラーが起きる前に、新しいライブラリを沢山インストールしたので、それが原因だと推測を立て色々試行錯誤して解決していきました。
新たにインストールしたライブラリをアンインストールするも治らず、Pyinstallerを入れ直すも治らず、Google先生に聞いても解決せずで1週間程が経過していました。

原因

全く不明

解決方法

PyInstallerをアンインストールしましょう

cmd
>>pip uninstall pyinstaller

auto-py-to-exeというライブラリをgit経由でインストールします
※gitが未インストールの方はインストールをしておいてください

cmd
>>git clone https://github.com/brentvollebregt/auto-py-to-exe.git
>>cd auto-py-to-exe
>>python setup.py install

これでバージョンが表示されれば解決しています

cmd
>>pyinstaller -v

最後に

この解決方法はとりあえず試したいという方にオススメしています。
なぜこれで上手くいったのかを調べる精神的余力はないので、どなたか有識者がいればコメントくれると嬉しいです
本当にPyInstallerはエラーが多いので精神的に参りそうですね。。

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?