I wrote a Python application that uses:
from PIL import Image
I want to distribute a packaged version of this application so that anyone who uses it does not have to install all the dependencies.
For this I used pyinstaller, without much success. I launched:
pyinstaller --onefile image_download.py
and he does not complain. However, when I launch the application, I get:
Traceback (last last call): File ", line 26, to File" / usr / local / lib / python 2.7 / dist-packages / PyInstaller / loader / pyi_importers.py ", line 270, to load_module exec (bytecode, module. dict ) File "/ home / ic / twitter -project / build / image_download / out00-PYZ.pyz / PIL.PngImagePlugin", line 40, to File "/ usr / local / lib / python 2.7 / dist-packages / PyInstaller / loader / pyi_importers.py ", line 270, in load_module exec (bytecode, module. Dict ) File" / home / ic / twitter -project / build / image_download / out00-PYZ.pyz / PIL.Image, line 63, in ImportError: cannot import name _imaging
I use:
- Ubuntu 14.04
- Python 2.7
- pyinstaller 2.1
- PIL.VERSION 1.1.7 (although I thought I installed Pillow 2.8.1)
script python image_download.py, pyinstaller _imaging - .
?