[英]"No module named pefile" even though I have installed pefile
I have Python 2.7 and Python 3.8 on the same computer我在同一台计算机上有 Python 2.7 和 Python 3.8
I am trying to get this to work: https://github.com/countercept/python-exe-unpacker我试图让它工作: 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]
但是当我尝试当前使用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.您应该使用pip freeze
来获取已安装包的列表。 Probably your py
and python
executables aren't the same, try py python_exe_unpack.py -i [programname.exe]
.可能你的py
和python
可执行文件不一样,试试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.您可以通过PYTHONPATH
环境变量添加额外的路径,或者只添加sys.path.append("/path/to/folder")
与您安装 pefile 的路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.