Search code examples
pythonvisual-studio-codepippyinstallerexe

How can I install pyinstaller?


I'm using vscode. There's a code that I'm gonna turn into (.exe). But before that I have to install pyinstaller. There's an error which I think says that I can not use 'pip'. I've written this code in the terminal: pip install pyinstaller . I've used pip3 install pyinstaller too. And now... this is the error:

What should I do? How can I use pip package? And how can I install pyinstaller and then do the thing I want?


Solution

  • Check if you have pip installed by going opening cmd and typing pip help. If you do not have it installed an error will show up.

    How to install Pip on Windows:

    1.Get the get-pip.py file - https://bootstrap.pypa.io/get-pip.py

    Download the file and save it anywhere you want, just remember where you saved it as you will need the path later.

    2.Open cmd. (If you get an error during the installation you might wanna try to run it as administrator)

    Use the cd command followed by a folder name to navigate to the location of the get-pip.py file.

    Now run python get-pip.py in your cmd.

    And you'll have pip installed.

    There might be a problem if you have multiple Python instances installed, check back here if that solution doesn't work.