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
ImportError: No module named 'backports' with Python 3.4 #9416
Comments
This is a macports bug: it has failed to express a dependency on |
#9417 updates the backport dependency to only apply on Python 2, and use shutil directly on Python 3. But the ports package for 4.2 is incorrect in specifying that the backports package is a dependency only on Python 2. |
closed by #9417 |
required by ipython 4.2.0: ipython/ipython#9416
Bug: ipython/ipython#9416 Fix: ipython/ipython#9417 Package-Manager: portage-2.2.28
Just upgraded IPython to 4.2.0 on Python 3.4 and starting from the terminal fails:
IPython/utils/terminal.py tries to
import backports.shutil_get_terminal_size
which is missing. I am using Python 3.4 and backports is not needed, shutil can be used directly.If I replace "backports.shutil_get_terminal_size" with "shutil" on lines 9 and 125 in terminal.py, everything works fine for me. This should be wrapped in a "if PY2" or added to py3compat.py.
Other relevant information:
OS: Mac OS X 10.6.8
Python version: 3.4.4
IPython version: 4.2.0
Installer: MacPorts
I install IPython through MacPorts (
port install py34-ipython
). In the Portfile, backports-shutil_get_terminal_size is added as a dependency, but only for Python 2.7, which is appropriate.The text was updated successfully, but these errors were encountered: