Go to advanced search

by tm48
Wed Sep 03, 2014 7:20 am
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

I changed the sources.list file but when I tried updating I got this error: W: Failed to fetch http://mirrordirector.rapsbian.org/raspbian/dists/jessie/main /i18n/Translation-en Something wicked happened resolving 'mirrordirector.rapsbi an.org:http' (-5 - No address associated with hostname) E: Some...
by tm48
Thu Aug 28, 2014 2:02 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

I updated my raspberry pi and then tried this:

Code: Select all

 sudo apt-get install python-pil 
I got the following error:
Reading package lists... Done
Building dependecy tree
Reading state information... Done
E: Unable to locate package python-pil
How can I fix this?
by tm48
Thu Jul 31, 2014 12:52 pm
Forum: Beginners
Topic: No Module Named Tkinter
Replies: 9
Views: 6043

Re: No Module Named Tkinter

photo = tkinter.PhotoImage(file = '/home/pi/blah.jpg') This line of code gave me the following error: Traceback (most recent call last): File "/home/pi/tkinterpy1.py", line 5, in <module> photo = tkinter.PhotoImage(file = '/home/pi/blah.jpg') File "/usr/lib/python3.2/tkinter/__init__.py", line 3255...
by tm48
Thu Jul 31, 2014 10:36 am
Forum: Beginners
Topic: No Module Named Tkinter
Replies: 9
Views: 6043

Re: No Module Named Tkinter

gkreidl wrote:replace
from tkinter import *
to
import tkinter

Then your code should work.
I replaced it. But now I am getting the following error:
Traceback (most recent call last):
File "/home/pi/tkinterpy1.py", line 2, in <module>
root = Tk()
NameError: name 'Tk' is not defined
by tm48
Thu Jul 31, 2014 8:19 am
Forum: Beginners
Topic: No Module Named Tkinter
Replies: 9
Views: 6043

Re: No Module Named Tkinter

Which version of Python are you using? I am using Python 3.2.3. So, I just ran the same program I had before and got a different error this time: Traceback (most recent call last): File "/home/pi/tkinterpy1.py", line 3, in <module> canvas = tkinter.Canvas(root) NameError: name 'tkinter' is not defi...
by tm48
Wed Jul 23, 2014 12:26 pm
Forum: Beginners
Topic: No Module Named Tkinter
Replies: 9
Views: 6043

No Module Named Tkinter

Hi, I am new to the raspberry Pi and Python but I have exprience programming. I am getting errors running the following program: from tkinter import * root = tk.Tk() canvas = tkinter.Canvas(root) canvas.grid(row = 0, column = 0) photo = tkinter.PhotoImage(file = './blah.jpg') canvas.create_image(0,0...
by tm48
Fri Jul 18, 2014 12:56 pm
Forum: Troubleshooting
Topic: IDLE3: Subprocess Startup Error
Replies: 1
Views: 1596

IDLE3: Subprocess Startup Error

I opened the IDLE 3 on my Pi and got a Subprocess Startup Error pop up. It says "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewell software is blocking the connection." This has never happened before. What should I do? I need to use IDLE3 but it shut...
by tm48
Mon Jul 14, 2014 10:38 am
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

joan wrote:The PIL Image show function used to use a program called xv to display the image on *nix systems.

xv has been effectively deprecated for some time.

That might be why you get no display.
Wow. Thank you for informing me! Do you know of any alternatives that I could use to display an image?
by tm48
Mon Jul 14, 2014 9:36 am
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

After doing 'sudo apt-get install python3-pip' on Raspbian, I then have a pip-3.2 command available... :?: That worked! Now I have this code in IDLE3 that compiles but doesn't show me the image: from PIL import Image global ext ext = ".jpg" imageFile = "blah.jpg" iml = Image.open(imageFile) iml.sho...
by tm48
Thu Jul 10, 2014 12:13 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

This suggests that using pip3 is more reliable for installing pillow than setuptools is? I was following that but got an error when I was downloading this dependency: sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev \ libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev The error...
by tm48
Thu Jul 10, 2014 11:49 am
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

This suggests that using pip3 is more reliable for installing pillow than setuptools is? I was following that but got an error when I was downloading this dependency: sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev \ libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev The error...
by tm48
Tue Jul 08, 2014 8:05 am
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

It's hard to tell, without seeing the exact error message... :| It highlights "iml" in print iml.format and a pop up that says invalid syntax comes up. If I try commenting that out, then I get: Traceback (most recent call last): File "/home/pi/testide.py", line 1, in <module> from PIL import Image ...
by tm48
Mon Jul 07, 2014 12:05 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

So I must have done something wrong because I used this command: sudo python3 setup.py install However, when I tried running my code on IDLE3 it says its invalid. But it runs successfully on IDLE. Should I be concerned about this? This is the code that I have so far: from PIL import Image global ext...
by tm48
Wed Jul 02, 2014 5:46 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

Great! That seemed to work. Thank you!
by tm48
Wed Jul 02, 2014 4:20 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

Great! I downloaded the python3 version of it. And now I got this:
pi@raspberrypi ~/Pillow-2.3.0 $ sudo python3 setup.py
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
by tm48
Wed Jul 02, 2014 2:50 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

Okay so here is what I got: pi@raspberrypi ~/Pillow-2.3.0 $ sudo python3 setup.py Traceback (most recent call last): File "setup.py", line 19, in <module> from setuptools import Extension, setup, find_packages ImportError: No module named setuptools I did this: sudo apt-get install python-setuptools...
by tm48
Tue Jul 01, 2014 12:19 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

DirkS wrote: How did you try to use it?
I was trying to do something like:

Code: Select all

from PIL import image
global ext
ext = ".jpg"
imageFile = "test.jpg"
img = Image.open(imageFile) 
or something like:

Code: Select all

import Image 
img = Image.open("test.jpg")
img.save("test.png")
img.show()
by tm48
Tue Jul 01, 2014 12:12 pm
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Re: Trouble installing Pillow / PIL

I found out that I couldn't run the "setup.py" file that comes in PIL because I didn't have the Setuptools module installed properly. I vaguely remember getting an error when I had done: sudo apt-get install python-dev python-setuptools What should I do to fix that? Should I just try downloading it ...
by tm48
Thu Jun 12, 2014 11:24 am
Forum: Beginners
Topic: Trouble installing Pillow / PIL
Replies: 39
Views: 27425

Trouble installing Pillow / PIL

Hey, I am new to Raspberry Pi and the terminal. I want to write a simple python program that can display a JPEG but I am having issues downloading/installing PIL (Python Imaging Library)/Pillow. I tried to do sudo apt-get and it says it is done but then it doesn't work. I also tried downloading the ...

Go to advanced search