简体   繁体   中英

running pyinstaller after Anaconda install results in ImportError: no Module named 'pefile'

I did conda install -c acellera pyinstaller=3.2.3 as per Anaconda's website and it looks like it installed correctly but I get the following if I try to run it via cmd:

C:\Users\Cornelis Dirk Haupt\PycharmProjects\Mesoscale-Brain-Explorer\src>pyinstaller
Traceback (most recent call last):
  File "C:\Anaconda3\Scripts\pyinstaller-script.py", line 9, in <module>
    load_entry_point('PyInstaller==3.3.dev0+g8756735', 'console_scripts', 'pyinstaller')()
  File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 542, in load_entry_point
  File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 2569, in load_entry_point
  File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 2229, in load
  File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 2235, in resolve
  File "C:\Anaconda3\lib\site-packages\PyInstaller\__main__.py", line 21, in <module>
    import PyInstaller.building.build_main
  File "C:\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 34, in <module>
    from .api import PYZ, EXE, COLLECT, MERGE
  File "C:\Anaconda3\lib\site-packages\PyInstaller\building\api.py", line 38, in <module>
    from PyInstaller.utils.win32 import winmanifest, icon, versioninfo, winresource
  File "C:\Anaconda3\lib\site-packages\PyInstaller\utils\win32\versioninfo.py", line 17, in <module>
    import pefile
ImportError: No module named 'pefile'

What's going on? Pyinstaller works fine with python 2.7 without Anaconda. But I've recently decided to make the jump to Anaconda + 3.5. I cant find any module named pefile or how to install it with Anaconda. I can install pefile easily using pip3 though.

您可以使用Anaconda的点来安装它,只需转到Anaconda的Script文件夹并执行:

pip.exe install pefile

install this instead:

conda install -c conda-forge pyinstaller=3.2.1

working fine for me after a couple of tries!

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