Python returns "SyntaxError: invalid syntax sys module" [closed]

import pandas as pd sys.path.insert(0, "/usr/lib/python2.7/site-packages")

This line contains two statements. Split them into two lines:

import pandas as pd
sys.path.insert(0, "/usr/lib/python2.7/site-packages")

Or, if they must be in one line, separate them with semicolon (highly not recomended!!!):

import pandas as pd; sys.path.insert(0, "/usr/lib/python2.7/site-packages")

Browse More Popular Posts

Leave a Comment