Forums

how to install python modules

hi, i want to install Lightblog script. but when i run install.py file it results an error message :

File "/home/linuxer9/LightBlog-1.3.1/blog/functions.py", line 13, in <module>
import Image
ImportError: No module named Image

how can i install "image" module to run the script correctly thanks :)

Hello,

Change the line to

from PIL import Image

Cheers, Robert

@linuxer9: Welcome to PA. I bet you'll love it here!!

@all: How many ears does Spock have? Three: a left ear, a right ear, and a final frontier.

[Sorry...I felt like sharing a corny joke]

please , how can i install python-imaging package

Hi there, python imaging (PIL) is already installed - the problem is that it is a strange package that doesn't always install the same way on all platforms.

So, in some online instructions, you will find it says you need to do:

import Image

In others instructions, you have to do:

from PIL import Image

On PythonAnywhere, it's the second version. So, as rcs1000 says, you'll need to change those import lines

On a related subject: is there a post on how virtualenv is set up to work at PAW? It's wonderful because pip is an integral part of that package.

I noticed /usr/local/bin/virtualenv is available. My scripts, however, require a direct link to virtualenv.py -- so does anybody know?

(Sure, I could just upload my private copy, but I figure PAW always updates theirs to the latest version, and there might be special paths and symlinks tailored for this particular system :-) Thanks!