5

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.

Frikster
  • 2,755
  • 5
  • 37
  • 71
  • See http://stackoverflow.com/questions/39728108/running-pyinstaller-after-anaconda-install-results-in-importerror-no-module-nam – cdarke Dec 06 '16 at 07:26

2 Answers2

7

You can use Anaconda's pip to install it, just go to the Script folder in Anaconda and execute:

pip.exe install pefile
4

install this instead:

conda install -c conda-forge pyinstaller=3.2.1

working fine for me after a couple of tries!

Bassem Shahin
  • 656
  • 7
  • 13
  • 1
    Given that the version is now at 3.3, it's potentially unwise to include the `=3.2.1` version specification in the above command. Simply `conda install -c conda-forge pyinstaller` should be sufficient to get the latest version available in the conda-forge channel. – flutefreak7 Dec 21 '17 at 18:47
  • Also worth noting I just got an error that the pyinstaller available via conda-forge requires python 3.5+ and I'm on 3.4. Just a heads up if others end up here. – flutefreak7 Dec 21 '17 at 18:53
  • the latest version gives error for me, I just shared what works properly with me after some tries! – Bassem Shahin Dec 22 '17 at 19:31