diff --git a/pymatbridge/matlab_magic.py b/pymatbridge/matlab_magic.py
index <HASH>..<HASH> 100644
--- a/pymatbridge/matlab_magic.py
+++ b/pymatbridge/matlab_magic.py
@@ -235,7 +235,7 @@ class MatlabMagics(Magics):
             if len(imgf):
                 # Store the path to the directory so that you can delete it
                 # later on:
-                image = open(imgf, 'rb').read().decode('utf-8')
+                image = open(imgf, 'rb').read()
                 if ipython_version < 3:
                     display_data.append(('MatlabMagic.matlab',
                                          {'image/png':image}))
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ else:
         
 # Get version and release info, which is all stored in pymatbridge/version.py
 ver_file = os.path.join('pymatbridge', 'version.py')
-exec(open(ver_file).read().decode('utf-8'))
+exec(open(ver_file).read())
 
 opts = dict(name=NAME,
             maintainer=MAINTAINER,
BF: No need for these calls to `decode`.

In my hands, these caused crashes on installation and testing on both python 2
and python 3.