デスクトップにテストでメモ帳に「hello.txt]というファイルを作りましたが、jupyter notebookでファイルを読み込もうとしても以下のようにエラーになります。
fin=open('hello.txt') line=fin.read() print(line) fin.close FileNotFoundError: [Errno 2] No such file or directory: 'hello.txt'
ファイルpathが正しいかもう一度確認してください。
Q&A
退会済みユーザー
総合スコア0
投稿2019/03/20 06:11
デスクトップにテストでメモ帳に「hello.txt]というファイルを作りましたが、jupyter notebookでファイルを読み込もうとしても以下のようにエラーになります。
fin=open('hello.txt') line=fin.read() print(line) fin.close FileNotFoundError: [Errno 2] No such file or directory: 'hello.txt'