Reputation: 109
I have made a script in python that crops an image. I am using Anaconda for that and Python 2.7 in Windows
What i want to do is to run this script for a whole folder with images, so i was thinking of making a bash file. I followed these steps and bash on Ubuntu on Windows. I installed again Anaconda for linux and some libraries needed but now i am getting this error even if i have installed the same package as in Windows.
Any ideas? Or maybe another ways to do it on Windows where my script is already running well on Anaconda?
Upvotes: 0
Views: 1016
Reputation: 26
This may not be what you're looking for as you asked for assistance with your bash script. However, you could modify your python script to crop all the images in a specified folder using the glob function. You can run it on windows with anaconda installed.
glob returns a list of all the file names matching the unix style flags and wildcards. A sample of how this might work for your scenario may be:
import glob
files = glob.glob("c:/path/*") # where path is the path to your images to be cropped
# then run your script on all the images to be cropped
for f in files:
# Run python script
Upvotes: 1