change file opening/reading method

hoping this will fix pip installation errors