diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 
 from setuptools import setup
-from codecs import open
 from os import path
+from io import open
 
 here = path.abspath(path.dirname(__file__))
 
@@ -11,8 +11,8 @@ with open(path.join(here, 'anpy', '__version.py')) as __version:
     exec(__version.read())
 assert __version__ is not None
 
-with open(path.join(here, 'README.md')) as readme:
-    LONG_DESC = readme.read().decode('utf-8')
+with open(path.join(here, 'README.md'), encoding='utf-8') as readme:
+    LONG_DESC = readme.read()
 
 setup(
     name='anpy',
Make setup.py compatible with python 3