FileNotFoundError: [Errno 2] No such file or directory [duplicate]

This question already has answers here: Python open() gives FileNotFoundError/IOError: Errno 2 No such file or directory (7 answers) Closed 3 years ago.

I am trying to open a CSV file but for some reason python cannot locate it.

Here is my code (it’s just a simple code but I cannot solve the problem):

import csv

with open('address.csv','r') as f:
    reader = csv.reader(f)
    for row in reader:
        print row

Leave a Comment