I have Python 2.7 and Python 3.8 on the same computer

I am trying to get this to work: https://github.com/countercept/python-exe-unpacker

The requirements are:

pefile==2017.9.3unpy2exe==0.3uncompyle6==2.11.5xdis==3.5.5pycrypto==2.6.1configparser==3.5.0

And I guess the other stuff is installed correctly (not sure). But when I try to currently run this thing with python python_exe_unpack.py -i [programname.exe]

I get the error:

C:\Python27\python.exe: No module named pefile

I've run both of these commands:

py -m pip install pefile==2017.9.3py -m pip install pefile==2019.4.18

and the problem persists.

Any idea what might be going wrong?

1

Best Answer


You should use pip freeze to obtain the list of installed packages. Probably your py and python executables aren't the same, try py python_exe_unpack.py -i [programname.exe]. Also check which paths you using to obtain that package:

import sysprint(sys.path)

You can add extra paths through PYTHONPATH environment variable or just sys.path.append("/path/to/folder") with path where is you're installed pefile.