+ 1
using python in free wing ide to import images
i would like to import some images to my program im writing in a free version of wing ide on a windows 10 computer my question is this is there a way to do this if so what format do the images need to be in?
20 Answers
+ 6
Oh, you need to invoke this in your operating system's command line, not the Python console. Pip is just an installer so it has to be executed as a normal file.
The above goes for *all* modules you might want to "pip install" in the future.
+ 4
Hmm... I used a simple 'pip install pillow' instruction and it worked like a charm. Just open your Python console and run it. Let me know if you get any errors, we'll solve it ;)
+ 4
Might be an issue with your PATH setting perhaps. Did you install your Python correctly?
+ 3
What exactly do you want to do, display those images to the user? Do you use a particular GUI library?
+ 3
Alright then, let's break this down. What kind of error do you get? What is your Python version? Does it work if you just enter 'python' in the command line?
+ 3
Yep, it's most likely the PYTHONPATH thing then. It is an environment variable which has to be set and point to where your Python installation is located. Check out the docs on how to set it properly in Windows:
https://docs.python.org/3/using/windows.html
+ 3
Python is free, forever and ever :)
It's most probably the file path setting, you have to set it manually, I think. Check out this instruction set:
https://docs.python.org/3/using/windows.html#excursus-setting-environment-variables
+ 2
Try pillow module, it handles all sorts of files neatly and easily:
https://pillow.readthedocs.io/en/4.3.x/
from PIL import Image
im = Image.open('myphoto.jpg')
im.show()
+ 2
no luck on reinstalling I want to thank you for all your help I'm going to put it off for now it's not needed for my program to run just something I would like to add I will keep working on it and I'll try to find someone I can sit down with and they can help me while looking at the computer itself either way when I do find the answer I will post what was going on I'm sure it's the path too now after doing some reading on it but even after trying the things to fix it I'm still getting no where so maybe I'm doing it wrong I don't but again thank you so much for your help
+ 1
I want to display an image to the user
+ 1
and I don't use particular GUI library at the moment
+ 1
i cant seem to install pillow any advice i have tried the code provided on the link you gave but its not working any advice
+ 1
when I try to run pip install pillow I get a Syntex error
+ 1
that makes sense thank you
+ 1
I've tried running it in the cmd line and also in \ py.exe and I can't get it to work not sure where I need to run this command
+ 1
I installed python because I'm taking a college course on it so I just followed their guide lines on how to do it some assuming I did yes
+ 1
python v3.6 if I run the install command in cmd prompt the error is pip is not an internal or external command if I type just python same error
+ 1
if I enter py.exe it will go that far and then I get an invalid syntax error at the end of the word install
+ 1
I'm still not getting anywhere still getting the same errors is it possible that it's because I have the free version of python?
+ 1
I'm reinstalling python to see if that helps