Libedit / readline conflict with ipython 3.2.2 on OS X 10.7 Lion

I am trying to configure ipython 3 (works fine 2.7) on a Mac working with Lion, but cannot seem to get rid of the following error:

192:~ mlauria$ /Library/Frameworks/Python.framework/Versions/3.2/bin/ipython3 /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages\ /IPython/utils/rlineimpl.py:96: RuntimeWarning: Leopard libedit detected - \ readline will not be well behaved including some crashes on tab completion, and \ incorrect history navigation. It is highly recommended that you install readline,\ which is easy_installable with: 'easy_install readline' RuntimeWarning) Python 3.2.2 (v3.2.2:137e45f15c0b, Sep 3 2011, 17:28:59) 

easy_install readline worked correctly to fix it on ipython 2.7, but it does not fix 3.2.

+4
source share
2 answers

This is sad since more and more Python distributions on OS X are being built with the Apple-supplied libedit on OS X, and not with the GPL licensed GNU readline library, which Apple does not ship. For example, the current 64-bit / 32-bit python.org installers for OS X use libedit , while the 32-bit installers currently use readline because libedit does not work on older versions of OS X. Although 32- the bit installer for Python 3.2 can be installed on 10.7, this is problematic on 10.7 if you need to install any C extension modules, since this Python was built with older 10.4u SDKs and ppc arches that are not supported on 10.7. Ideally, iPython must be modified to work properly with libedit or readline . If there are Python errors prohibiting this, errors must be logged with Python itself. In addition, perhaps supporters of the readline package on PyPI may be convinced of the creation and deployment of the 3.2 binary package.

Otherwise, you can create it yourself using the original distribution, assuming you have installed Xcode for Lion. If the Python 3.2 framework is not in your way, you will need to do:

 $ export PATH=/Library/Frameworks/Python.framework/Versions/3.2/bin:$PATH 

Then, if you have not installed Distribute for Python 3.2:

 $ curl -O http://python-distribute.org/distribute_setup.py $ python3.2 distribute_setup.py 

Then download, create and install the readline package from PyPI:

 $ easy_install-3.2 readline 

Or you can install Python 3.2 from a third-party distributor such as MacPorts, which provides a readline port ( py32-readline ) along with an iPython port.

+6
source

Do you have a command called something like easy_install-3.2 ?

Looking at the readline in PyPI , it seems like there is no binary for Python 3, so you probably need the appropriate material to compile it from the source (if you cannot find Python 3 elsewhere).

0
source

Source: https://habr.com/ru/post/1383339/


All Articles