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

No menu bar displayed on OS X when run from terminal #997

Closed
robintw opened this issue May 20, 2016 · 6 comments
Closed

No menu bar displayed on OS X when run from terminal #997

robintw opened this issue May 20, 2016 · 6 comments

Comments

@robintw
Copy link
Contributor

robintw commented May 20, 2016

I've got a rather strange bug with Glue on OS X. When launching glue from the terminal (with just the glue command), it seems to load fine, but the menu bar at the top of the screen is still the menu bar for the Terminal app:

screen shot 2016-05-20 at 22 36 45

Clicking on that menu bar does nothing. Switching from the Glue window to another window (not the Terminal window, but any other window) and then back to Glue gets the menu bar to appear properly.

Interestingly, this does not occur when running glue through IPython, even when IPython is running in the Terminal.

It's obviously not a major problem, as there is a workaround - but not everyone would think to try that workaround.

@astrofrog
Copy link
Member

@robintw - how did you install Glue? If you used Anaconda, could you try doing conda install python.app to see if this helps? If it still doesn't work, can you let me know what version of Glue you are using? (glue --version)

@robintw
Copy link
Contributor Author

robintw commented May 21, 2016

Ah, I forgot to give some extra details in the original post (I shouldn't submit issues late at night when I'm tired!).

This occurs with Glue installed via Anaconda, and python.app is already installed. It also occurs with the latest version of Glue cloned from this repo (I cloned it, ran python setup.py develop and then ran python glue/main.py - which seems to run it ok)

@astrofrog
Copy link
Member

astrofrog commented May 21, 2016

@robintw - what is the output of:

cat `which glue`

? In particular I'm interested in the first line, which should be

#!/bin/bash /Users/tom/miniconda3/envs/test/bin/python.app

(if using the Anaconda version)

@robintw
Copy link
Contributor Author

robintw commented May 21, 2016

Ah, I think I've worked out what is going on here.

The output I got when running:

cat `which glue`

Was:

#!/opt/anaconda3/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'glueviz','gui_scripts','glue'
__requires__ = 'glueviz'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('glueviz', 'gui_scripts', 'glue')()
    )

However, I think that was caused by me running python setup.py develop in the cloned Glue git repo. When I uninstalled and reinstalled the glueviz package using conda, I got the expected answer (with python.app), and don't have the menu issue any more.

So, I guess the only question left is what the recommended way of running directly from source (for development etc) is? Is there an easy way to get a script to load Glue that works like the conda one does, but uses the local clone of the code?

@astrofrog
Copy link
Member

This is a known issue with Anaconda - see ContinuumIO/anaconda-issues#446 for a discussion. Basically, the only way to fix it properly with Anaconda that I can figure out for now is to edit the glue script and change the first line so that it points to the python.app script instead of python (see my latest comment in that issue). I need to try and find a longer term solution.

Note that I didn't really notice this myself until yesterday because it was not a problem in MacOS 10.8, but the issue is there in the latest versions of MacOS X.

@astrofrog
Copy link
Member

Closing as a duplicate of #597

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

2 participants