diff --git a/setup.py b/setup.py
index 0844a2c21bbdb0619dfca21186db6295af265a20_c2V0dXAucHk=..97fbedc2e25043f0bf48546b02912170c1eabda2_c2V0dXAucHk= 100644
--- a/setup.py
+++ b/setup.py
@@ -34,5 +34,8 @@
     packages=['hggit'],
     package_data={'hggit': ['help/git.rst']},
     include_package_data=True,
-    install_requires=['dulwich>=0.19.0'],
+    install_requires=[
+        'dulwich>=0.19.0;python_version>="3.0"',
+        'dulwich>=0.19.0,<0.20.0;python_version<"3.0"',
+    ],
 )