File tree 2 files changed +24
-5
lines changed
2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 7
7
- $HOME/.cache/pip
8
8
python :
9
9
- 3.6
10
- - 2.7
11
10
12
11
sudo : required
13
12
Original file line number Diff line number Diff line change 18
18
19
19
name = "notebook"
20
20
21
- # Minimal Python version sanity check
22
- v = sys .version_info
23
- if v [:2 ] < (2 ,7 ) or (v [0 ] >= 3 and v [:2 ] < (3 ,3 )):
24
- error = "ERROR: %s requires Python version 2.7 or 3.3 or above." % name
21
+ if sys .version_info < (3 , 5 ):
22
+ pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.'
23
+ try :
24
+ import pip
25
+ pip_version = tuple ([int (x ) for x in pip .__version__ .split ('.' )[:3 ]])
26
+ if pip_version < (9 , 0 , 1 ) :
27
+ pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. ' \
28
+ 'pip {} detected.' .format (pip .__version__ )
29
+ else :
30
+ # pip is new enough - it must be something else
31
+ pip_message = ''
32
+ except Exception :
33
+ pass
34
+
35
+
36
+ error = """
37
+ Notebook 6.0+ supports Python 3.4 and above.
38
+ When using Python 2.7, please install Notebook 5.x.
39
+
40
+ Python {py} detected.
41
+ {pip}
42
+ """ .format (py = sys .version_info , pip = pip_message )
43
+
25
44
print (error , file = sys .stderr )
26
45
sys .exit (1 )
27
46
100
119
'nbval' , 'nose-exclude' , 'selenium' ],
101
120
'test:sys_platform == "win32"' : ['nose-exclude' ],
102
121
},
122
+ python_requires = '>=3.4' ,
103
123
entry_points = {
104
124
'console_scripts' : [
105
125
'jupyter-notebook = notebook.notebookapp:main' ,
You can’t perform that action at this time.
0 commit comments