FILENOTFOUNDERROR:[ERRNO 2]没有这样的文件或目录:'数据集/flower/flower_photos'
我遵循练习9.1上的代码,,这是代码:
flowers_root_path = os.path.join(FLOWERS_PATH, "flower_photos")
flower_classes = sorted([dirname for dirname in os.listdir(flowers_root_path)
if os.path.isdir(os.path.join(flowers_root_path, dirname))])
flower_classes
但是我有错误: fil> filnotfounderror:[errno 2]没有此类文件或目录:花/flower_photos'
有人知道如何解决这个问题吗,谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定目录是否存在?
查看目录是否真的存在
这本来可以是评论,但我没有足够的代表评论
希望这会有所帮助:)
Are you sure the directory exists ?
See if the directory actually exists
This could have been a comment but I dont have enough rep to comment
Hope this helps :)