Sep-05-2022, 09:02 AM
One day, I installed a module, I can't even remember what it was. While it was installing, I noticed that it installed a version of pillow.
After that, im.show() would not work, don't know where the problem lies.
I got this advice from https://realpython.com/python-virtual-en...-a-primer/
Just these last few days I needed to do stuff with a lot of photos, so I made a directory /home/pedro/images
I go to the folder images then activate and the bash prompt changes to this:
After that, im.show() would not work, don't know where the problem lies.
from PIL import Image # pics is a list of image names for pic in pics: im = Image.open(pic) im.show()I can now only do this in a venv
I got this advice from https://realpython.com/python-virtual-en...-a-primer/
Quote:Made a directory in /home/pedro called PVE. Go there in bash then:
1. python3 -m venv OMRenv (python3 -m venv new_directory_name)
2. In bash: source OMRenv/bin/activate then you are working within the venv
3. Type deactivate in bash when you see (OMRenv) to deactivate the virtual environment.
4. You can run IDLE within the activated virtual environment with this command:
python -m idlelib.idle (works well)
Just these last few days I needed to do stuff with a lot of photos, so I made a directory /home/pedro/images
I go to the folder images then activate and the bash prompt changes to this:
Quote:(images) pedro@pedro-HP:~/images$
Quote:pedro@pedro-HP:~/images$ source images/bin/activate
(images) pedro@pedro-HP:~/images$ deactivate
pedro@pedro-HP:~/images$