如何在Windows下运行python模块andrewning/sortphotos

2024-09-29 07:31:08 发布

您现在位置:Python中文网/ 问答频道 /正文

安装并运行这个python模块:https://github.com/andrewning/sortphotos

  • Windows 8+Python 3.4
  • 模块安装成功
  • 两个文件夹都存在并且“原始”包含图像

我的命令

python sortphotos.py -r D:\image-test\origin D:\image-test\destination

错误

FileNotFoundError: [WinError 2] The system cannot find the file specified

问题:

如何在Windows环境下正确运行该模块。在


Tags: 模块pyhttpstest图像image命令github
3条回答

在windows上用“\\”代替“\”,它应该可以工作。在

python sortphotos.py -r D:\\image-test\\origin D:\\image-test\\destination

两件事:

1-用引号标出你的来源地和目的地。在

python sortphotos.py -r "D:\image-test\origin" "D:\image-test\destination"

2-确保您在sortphotos.py所在的目录中

^{pr2}$

就沿着这条路走了。为了在windows上运行,需要做一些事情。它们是:

1)必须安装Perl。我是通过安装Github for windows得到的。无论您选择使用Perl,请确保perl.exe文件在你的路上。在

2)不能使用pythonv2。我现在必须同时安装这两个,然后确保python2在我的路径上。在

这些依赖关系没有得到解释有点痛苦,但我得说,一旦你克服了这个问题,这个脚本真的很好用。在

注意:我不必像内科建议的那样用“\”代替“\”。我认为这个问题已经解决了。在

相关问题 更多 >