运行 anaconda 通过 bash 文件
Run anaconda through bash file
我在 python 中制作了一个裁剪图像的脚本。
为此,我使用 Anaconda 并在 Windows
中使用 Python 2.7
我想做的是 运行 这个脚本用于包含图像的整个文件夹,所以我想制作一个 bash 文件。
即使我安装了与 Windows.
中相同的软件包,我也遵循了 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
有什么想法吗?或者也许可以在 Windows 上使用另一种方法,我的脚本在 Anaconda 上已经 运行 运行良好?
这可能不是您正在寻找的内容,因为您寻求有关 bash 脚本的帮助。但是,您可以修改 python 脚本以使用 glob 函数裁剪指定文件夹中的所有图像。您可以 运行 在 windows 上安装 anaconda。
glob returns 匹配 unix 风格标志和通配符的所有文件名的列表。这可能如何适用于您的场景的示例可能是:
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
我在 python 中制作了一个裁剪图像的脚本。 为此,我使用 Anaconda 并在 Windows
中使用 Python 2.7我想做的是 运行 这个脚本用于包含图像的整个文件夹,所以我想制作一个 bash 文件。 即使我安装了与 Windows.
中相同的软件包,我也遵循了 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有什么想法吗?或者也许可以在 Windows 上使用另一种方法,我的脚本在 Anaconda 上已经 运行 运行良好?
这可能不是您正在寻找的内容,因为您寻求有关 bash 脚本的帮助。但是,您可以修改 python 脚本以使用 glob 函数裁剪指定文件夹中的所有图像。您可以 运行 在 windows 上安装 anaconda。
glob returns 匹配 unix 风格标志和通配符的所有文件名的列表。这可能如何适用于您的场景的示例可能是:
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