File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,35 @@ Otherwise user code can fail at runtime arbitrarily later in the future, which c
284
284
be a difficult to debug and fix. Get inspiration from the message of failure at
285
285
runtime, and adapt for installation time.
286
286
287
+
288
+ Here is for a simple version of how IPython handle old versions of Python and
289
+ Pip that still try to install IPython 7.0+ on Python ` < (3,4) ` .
290
+
291
+ ``` python
292
+ if sys.version_info < (3 , 4 ):
293
+
294
+ error = """
295
+ IPython 7.0+ supports Python 3.4 and above.
296
+ When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
297
+ Python 3.3 was supported up to IPython 6.x.
298
+
299
+ See IPython `README.rst` file for more information:
300
+
301
+ https://github.com/ipython/ipython/blob/master/README.rst
302
+
303
+ Python {py} detected.
304
+
305
+ Try upgrading pip and retry.
306
+ """ .format(py = ' .' .join([str (v) for v in sys.version_info[:3 ]]))
307
+
308
+ print (error, file = sys.stderr)
309
+ sys.exit(1 )
310
+ ```
311
+
312
+ You can look at the [ full
313
+ check] ( https://github.com/ipython/ipython/blob/6a3e2db0c299dc05e636653c4a43d0aa756fb1c8/setup.py#L23-L58 )
314
+ that attempt to detect which version of pip is in used.
315
+
287
316
## Fix dependant libraries
288
317
289
318
If you control dependant packages, Make sure to include conditional dependencies
You can’t perform that action at this time.
0 commit comments