diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index e88be40..33659b8 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -176,7 +176,7 @@ def pyod(filename):
     def _pyod2():
         out = []
 
-        fid = open(filename, 'r')
+        fid = open(filename, 'rb')
         try:
             yo = [int(oct(int(binascii.b2a_hex(o), 16))) for o in fid.read()]
             for i in range(0, len(yo), 16):
