FileNotFoundError:[WinError 3]系统找不到指定的路径: [英] FileNotFoundError: [WinError 3] The system cannot find the path specified:
本文介绍了FileNotFoundError:[WinError 3]系统找不到指定的路径:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-5f5284db0527> in <module>()
39 # extract features from all images
40 directory = 'Flicker8k'
---> 41 features = extract_features(directory)
42 print('Extracted Features: %d' % len(features))
43 # save to file
<ipython-input-6-5f5284db0527> in extract_features(directory)
18 # extract features from each photo
19 features = dict()
---> 20 for name in listdir(directory):
21 # load an image from file
22 filename = directory + '/' + name
**FileNotFoundError: [WinError 3] The system cannot find the path specified: 'Flicker8k'**
推荐答案
系统找不到指定的路径:"Flicker8k"
The system cannot find the path specified: 'Flicker8k'
它抱怨无法找到指定的目录.尝试用相对的目录路径directory = 'Flicker8k'
替换为Flicker8k
目录的完整绝对路径(似乎在Windows上看起来像C:\myproject\Flicker8k
,或者在Linux /home/user/myproject/Flicker8k
上或该数据集所在的地方).因此,请确保:
It complains about not being able to find specified directory. Try to replace relative directory path directory = 'Flicker8k'
with full absolute path to the Flicker8k
directory (seems like you are on Windows so something that looks like C:\myproject\Flicker8k
or if you are on linux /home/user/myproject/Flicker8k
or wherever that dataset resides). So, make sure to:
- 使用绝对路径而不是真实的
- 文件夹(具有正确的大写字母)
- 数据集实际上在所述文件夹中
- 可以访问文件夹(和其中的文件)的权限
这篇关于FileNotFoundError:[WinError 3]系统找不到指定的路径:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文