diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -13,12 +13,13 @@ install_requires = [
 test_requires = [
     'nose2',
     'pandas',
-    'pathlib',
-    'anndata',
     'coverage',
     'coveralls'
 ]
 
+if sys.version_info[0] == 3:
+    test_requires += ['anndata']
+
 doc_requires = [
     'sphinx',
     'sphinxcontrib-napoleon',
don't install anndata on python2