Question

I'm running a python script which resizes and converts images to JPG and an RGB. This script worked perfectly until I upgraded my computers HD and moved everything over from my Time Machine backup. Now when I try to run the script it can't find any modules. Specifically the Image module (I use Pillow).

Traceback (most recent call last):
  File "processImgs.py", line 1, in <module>
    import os, sys, argparse, shutil, imgFunctions
  File "/web/script/python/img_processing/imgFunctions.py", line 1, in <module>
    import os, sys, Image, shutil, re
ImportError: No module named Image

I am using Homebrew to manage my modules, and "brew list" outputs the following:

freetype    graphicsmagick  libpng      libtool     little-cms2 openssl     pkg-config  readline    webp
gdbm        jpeg        libtiff     little-cms  openjpeg    pillow      python      sqlite

If i run "pip list" I get:

Pillow (2.3.0)
pip (1.5.4)
setuptools (2.2)
wsgiref (0.1.2)

If i run "help(modules)" in python, the Image module isn't listed.

Was it helpful?

Solution

Could be your python path isn't set up correctly after the move.

see here for the homebrew/python docs page and it seems that a reinstall of homebrew may fix it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top