File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,17 @@ def find_version(*file_paths):
28
28
version = find_version ("gpytorch" , "__init__.py" )
29
29
30
30
31
+ torch_min = "1.0.1"
32
+ install_requires = [">=" .join (["torch" , torch_min ])]
33
+ # if recent dev version of PyTorch is installed, no need to install stable
34
+ try :
35
+ import torch
36
+ if torch .__version__ >= torch_min :
37
+ install_requires = []
38
+ except ImportError :
39
+ pass
40
+
41
+
31
42
# Run the setup
32
43
setup (
33
44
name = "gpytorch" ,
@@ -45,7 +56,7 @@ def find_version(*file_paths):
45
56
classifiers = ["Development Status :: 4 - Beta" , "Programming Language :: Python :: 3" ],
46
57
packages = find_packages (),
47
58
python_requires = ">=3.6" ,
48
- install_requires = [ "torch>=1.0.1" ] ,
59
+ install_requires = install_requires ,
49
60
extras_require = {
50
61
"dev" : [
51
62
"black" ,
You can’t perform that action at this time.
0 commit comments