hi, have already written a GUI program on a different Pc, i copied the py file unto a new pc to continue with the building,i have installed all the necessary modules but it gives an error when i run it.

Traceback (most recent call last):
  File "C:\Python34\aaaa.py", line 2, in <module>
    from PIL import Image, ImageTk
  File "C:\Python34\lib\site-packages\PIL\Image.py", line 62, in <module>
    from PIL import _imaging as core
ImportError: DLL load failed: %1 is not a valid Win32 application.

Recommended Answers

All 4 Replies

I suggest to uninstall PIL (or pillow) and reinstall Pillow‑2.6.1.win‑amd64‑py3.4.exe from Gohlke's site.

From your error message I assume you are using the 32 bit version of Python 3.4

From the python documentation

>>> import sys
>>> is_64bits = sys.maxsize > 2**32
>>> is_64bits
True # check the answer on your computer

It should perhaps be named is_not_32bits, from a purist point of vue.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.