How to decompile compiled .pyc Python files
How to use uncompyle6 to decompile .pyc files in your directory.
Step 1. Install uncompyle6
pip install uncompyle6
A native Python cross-version decompiler and fragment decompiler. The successor to decompyle, uncompyle, and uncompyle2.
Step 2. Run uncompyle6 from Windows command prompt
Make sure you have added your Python directory to Path in your environment variables. For instance, if you use an Anaconda distribution of Python, add the following to Path:
C:\Users\<username>\Anaconda3
C:\Users\<username>\Anaconda3\Scripts
This ensures that you can run uncompyle6 directly from Windows command prompt. You can test this out by simply typing uncompyle6
in your command prompt.
Step 3. Decompile .pyc file in your local directory
Go to the directory where you have your .pyc file which you want to decompile.