---
# System prepended metadata

title: Create Python Execute File on Windows
tags: [Python]

---

# Create Python Execute File on Windows
###### tags: `Python`

* PATH environment
    ![](https://i.imgur.com/c6o1maW.png =480x)

    ![](https://i.imgur.com/xbccOSj.png =480x)

    ![](https://i.imgur.com/kcmUzx3.png =480x)

* Run "PowerShell"
    =="Shift" + right click== on working folder.
    ![](https://i.imgur.com/Pwv8ccM.png)

* Install "pyinstaller"
    ``` 
     > pip install pyinstaller
    ```
    
    ![](https://i.imgur.com/7MzSvY0.png)

* Check "pyinstaller" version 
    ```
     > pyinstaller --version
    ```
    
* Build Execute Python file
    ``` 
     > pyinstaller -F <python file>
    ```
    
* If PATH environment didn't set well.
    ![](https://i.imgur.com/OT6jjR4.png)

* It will create "build" & "dist" folders and *.spec file.

* The execute file can be found in "dist" folder.

