Skip to content
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

Bug with casa-pre and ipython when pip installing #19

Open
keflavich opened this issue May 4, 2018 · 1 comment
Open

Bug with casa-pre and ipython when pip installing #19

keflavich opened this issue May 4, 2018 · 1 comment

Comments

@keflavich
Copy link
Contributor

This is a weird interaction between several packages, but I want to report it.

If you attempt to install astroquery (and perhaps any of several other packages, but that's not clear) using

import pip
pip.main(['install', 'astroquery', '--user'])

CASA may fail to start (at least, CASA 5.3.0-121) with a failure like:

Traceback (most recent call last):
  File "/home/casa/packages/RHEL6/prerelease/casa-prerelease-5.3.0-121/lib/python2.7/start_casa.py", line 10, in <module>
    from IPython import start_ipython
  File "/home/casa/packages/RHEL6/prerelease/casa-prerelease-5.3.0-121/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>
    from .core.application import Application
  File "/home/casa/packages/RHEL6/prerelease/casa-prerelease-5.3.0-121/lib/python2.7/site-packages/IPython/core/application.py", line 25, in <module>
    from IPython.core import release, crashhandler
  File "/home/casa/packages/RHEL6/prerelease/casa-prerelease-5.3.0-121/lib/python2.7/site-packages/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/home/casa/packages/RHEL6/prerelease/casa-prerelease-5.3.0-121/lib/python2.7/site-packages/IPython/core/ultratb.py", line 128, in <module>
    from IPython.utils.terminal import get_terminal_size
  File "/home/casa/packages/RHEL6/prerelease/casa-prerelease-5.3.0-121/lib/python2.7/site-packages/IPython/utils/terminal.py", line 22, in <module>
    from backports.shutil_get_terminal_size import get_terminal_size as _get_terminal_size
ImportError: No module named shutil_get_terminal_size

The solution is to use pip to install the shutil_get_terminal_size package:

pip install backports.shutil_get_terminal_size --user

There are several ipython Issue threads that will turn up with this information if you google the ImportError.

@keflavich
Copy link
Contributor Author

Report from Leonardo: the solution above doesn't work unless you try harder:

pip uninstall backports.shutil_get_terminal_size

followed by:

pip install backports.shutil_get_terminal_size —user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant