File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 77 - $HOME/.cache/pip
88python :
99 - 3.6
10- - 2.7
1110
1211sudo : required
1312
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ environment:
66 matrix :
77 - CONDA_PY : 36
88 CONDA_INSTALL_LOCN : " C:\\ Miniconda36-x64"
9- - CONDA_PY : 27
10- CONDA_INSTALL_LOCN : " C:\\ Miniconda-x64"
119
1210platform :
1311 - x64
Original file line number Diff line number Diff line change 1818
1919name = "notebook"
2020
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 , 4 ):
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+
2544 print (error , file = sys .stderr )
2645 sys .exit (1 )
2746
101120 'nbval' , 'nose-exclude' , 'selenium' ],
102121 'test:sys_platform == "win32"' : ['nose-exclude' ],
103122 },
123+ python_requires = '>=3.4' ,
104124 entry_points = {
105125 'console_scripts' : [
106126 'jupyter-notebook = notebook.notebookapp:main' ,
You can’t perform that action at this time.
0 commit comments