8000 Improve our error messages for non compatibility. by Carreau · Pull Request #9900 · ipython/ipython · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve our error messages for 8000 non compatibility. #9900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions IPython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,24 @@

import os
import sys
import warnings

#-----------------------------------------------------------------------------
# Setup everything
#-----------------------------------------------------------------------------

# Don't forget to also update setup.py when this changes!
v = sys.version_info
if v[:2] < (3,3):
raise ImportError('IPython requires Python version 3.3 or above.')
del v
if sys.version_info < (3,3):
raise ImportError(
"""
IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Beginning with IPython 6.0, Python 3.3 and above is required.

See IPython `README.rst` file for more information:

https://github.com/ipython/ipython/blob/master/README.rst

""")

# Make it easy to import extensions - they are always directly on pythonpath.
# Therefore, non-IPython modules can be added to extensions directory.
Expand Down Expand Up @@ -143,4 +150,3 @@ def start_kernel(argv=None, **kwargs):
"""
from IPython.kernel.zmq.kernelapp import launch_new_instance
return launch_new_instance(argv=argv, **kwargs)

42 changes: 39 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,52 @@ Development and Instant runnimg
================================

You can find the latest version of the development documentation on `readthedocs
<http://ipython.readthedocs.io/en/latest/>`_.
<http://ipython.readthedocs.io/en/latest/>`_.

You can run IPython from this directory without even installing it system-wide
by typing at the terminal::

$ python -m IPython

Or see the `development installation docs
<http://ipython.readthedocs.io/en/latest/install/install.html#installing-the-development-version>`_
for the latest revision on read the docs.
for the latest revision on read the docs.

Documentation and installation instructions for older version of IPython can be
found on the `IPython website <http://ipython.org/documentation.html>`_



IPython requires Python version 3 or above
==========================================

Starting with version 6.0, IPython does not support Python 2.7, 3.0, 3.1, or
3.2.

For a version compatible with Python 2.7, please install the 5.x LTS Long Term
Support version.

If you are encountering this error message you are likely trying to install or
use IPython from source. You need to checkout the remote 5.x branch. If you are
using git the following should work:

$ git fetch origin
$ git checkout -b origin/5.x

If you encounter this error message with a regular install of IPython, then you
likely need to update your package manager, for example if you are using `pip`
check the version of pip with

$ pip --version

You will need to update pip to the version 8.2 or greater. If you are not using
pip, please inquiry with the maintainers of the package for your package
manager.

For more information see one of our blog posts:

http://blog.jupyter.org/2016/07/08/ipython-5-0-released/

As well as the following Pull-Request for discussion:

https://github.com/ipython/ipython/pull/9900
15 changes: 12 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,18 @@

# This check is also made in IPython/__init__, don't forget to update both when
# changing Python version requirements.
v = sys.version_info
if v[:2] < (3,3):
error = "ERROR: IPython requires Python version 3.3 or above."
if sys.version_info < (3,3):
error = """
IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Beginning with IPython 6.0, Python 3.3 and above is required.

See IPython `README.rst` file for more information:

https://github.com/ipython/ipython/blob/master/README.rst

"""

print(error, file=sys.stderr)
sys.exit(1)

Expand Down
0