How can I decompile .pyc files from Python 3.10?

Question:

I did try uncompyle6, decompyl3, and others, but none of them worked with 3.10. Is it even possible to do this right now?

Asked By: Rana

||

Answers:

Use pycdc.
Github: https://github.com/zrax/pycdc

git clone https://github.com/zrax/pycdc
cd pycdc
cmake .
make
make check
python pycdc C:UsersBobbyexample.pyc
Answered By: MD Kawsar

on Windows (presume you have both Cmake and MSBuild.exe)

git clone https://github.com/zrax/pycdc
cd pycdc
cmake .
MSBuild.exe pycdc.vcxproj
cd pycdc/Debug
pycdc.exe yourfile.pyc
Answered By: Zbooby

Ah tried doing this on windows but got the following errors:

C:Usersjoshpycharmpycpycdc>cmake .

CMake Warning (dev) at CMakeLists.txt:1 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:1 (project):
Running

‘nmake’ ‘-?’

failed with:

The system cannot find the file specified

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
— Configuring incomplete, errors occurred!

Was trying to use to rebuild a python 3.10.x file

Answered By: Josh Carter
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.