简体   繁体   中英

"No module named pefile" even though I have installed pefile

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.3
unpy2exe==0.3
uncompyle6==2.11.5
xdis==3.5.5
pycrypto==2.6.1
configparser==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.3

py -m pip install pefile==2019.4.18

and the problem persists.

Any idea what might be going wrong?

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 sys
print(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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM