Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

raise runtime error to require python 3.6 or later

edgarriba93f84ad651f6
diff --git a/torchgeometry/__init__.py b/torchgeometry/__init__.py
index 2910b1750..d96f4bb91 100644
--- a/torchgeometry/__init__.py
+++ b/torchgeometry/__init__.py
@@ -1,3 +1,9 @@
+# Make sure that torchgeometry is running on Python 3.6.0 or later
+# (to avoid running into this bug: https://bugs.python.org/issue29246)
+import sys
+if sys.version_info < (3, 6, 0):
+ raise RuntimeError("Pytorch Geometry requires Python 3.6.0 or later")
+
from .version import __version__
from torchgeometry import core