File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
from setuptools import setup , find_packages
2
2
import ctypes
3
3
4
+ # to check pip version
5
+ import pkg_resources
6
+
7
+
4
8
5
9
def checkCUDAisAvailable ():
6
10
"""
@@ -36,15 +40,24 @@ def getRequirements():
36
40
conditionalRequirements: list
37
41
A list of strings containing the pip pkgs.
38
42
"""
43
+ pipVersion = pkg_resources .require ("pip" )[0 ].version
44
+ print ("\n PIP Version" , pipVersion , "\n " )
45
+ olderPip = pipVersion < "20.0"
46
+
39
47
cudaLibsOk = checkCUDAisAvailable ()
40
48
41
49
conditionalRequirements = []
42
50
if cudaLibsOk :
43
51
conditionalRequirements += ["tensorflow-gpu==1.15.3" , ]
44
52
else :
45
53
print ("\n CUDA it's not available in your machine." )
46
- print (" You won't be able to use the GPU support.\n " )
47
- conditionalRequirements += ["tensorflow==1.15.3" , ]
54
+ #print(" You won't be able to use the GPU support.\n")
55
+ #if olderPip:
56
+ # tfRequirement = "tensorflow @ https://github.com/tensorflow/tensorflow/archive/v1.15.3.zip#egg=tensorflow-v1.15.3"
57
+ #else:
58
+ tfRequirement = "tensorflow==1.15.3"
59
+
60
+ conditionalRequirements += [tfRequirement ]
48
61
49
62
return conditionalRequirements
50
63
You can’t perform that action at this time.
0 commit comments