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

Focus stays in terminal on OS X and 1.3.1 #2881

Closed
sashkab opened this issue Mar 9, 2014 · 8 comments
Closed

Focus stays in terminal on OS X and 1.3.1 #2881

sashkab opened this issue Mar 9, 2014 · 8 comments

Comments

@sashkab
Copy link

sashkab commented Mar 9, 2014

I've got matplotlib 1.3.1 installed on OS X 10.9 (Mavericks). It was compiled following order:

  1. Install homebrew
  2. brew install readline sqlite gdbm xz --universal
  3. brew install python --universal
  4. brew install homebrew/science/openblas gfortran pkg-config
  5. brew install freetype --universal
  6. pip install git+https://github.com/matplotlib/matplotlib.git@v1.3.x (installing from 1.3.x branch because of issue of freetype 2.5.2 and os x, which was fixed in 1.3.x branch.

When I Run simple test, matplotlib will show window (behind current terminal). Attempting to press any hotkey will result in input send to the terminal. There is no dock icon in the dock for matplotlib. I can't select matplotlib window with cmd+tab.

I'm aware of #665, but this was two years ago and I hoped this could have been resolved.

@tacaswell tacaswell added the OSX label Mar 10, 2014
@tacaswell
Copy link
Member

@mdehoon or @efiring can you take a look at this?

@efiring
Copy link
Member

efiring commented Mar 11, 2014

I don't have homebrew python installed; right now I have Anaconda on my path, and if I do
python simple_plot.py
I see the behaviour described by @sashkab , but if I do
python.app simple_plot.py
everything works normally. So, it would seem that @sashkab is invoking a non-Framework build. Googling, I see references to a --framework option to brew install python, but looking at the latest python.rb, I do not see that option. Does the brew install, like Anaconda, have both forms of executable, python and python.app?

@sashkab
Copy link
Author

sashkab commented Mar 11, 2014

@efiring --framework is default install method in brew. Please see python.rb#L76.
System python doesn't come with python.app and observes exactly same behavior as one I built with homebrew.

@mdehoon
Copy link
Contributor

mdehoon commented Mar 12, 2014

Can you try

import sys
print sys.executable
This may tell you if your Python is installed as a framework.

@efiring
Copy link
Member

efiring commented Mar 12, 2014

For example, with Anaconda:

efiring@manini2:~$ python
Python 2.7.6 |Anaconda 1.9.1 (x86_64)| (default, Jan 10 2014, 11:23:15) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.executable
/Users/efiring/anaconda/bin/python
>>> 
efiring@manini2:~$ python.app
Python 2.7.6 |Anaconda 1.9.1 (x86_64)| (default, Jan 10 2014, 11:23:15) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.executable
/Users/efiring/anaconda/python.app/Contents/MacOS/python
>>> 

@sashkab
Copy link
Author

sashkab commented Mar 12, 2014

@mdehoon Here it is.

~ $ python
Python 2.7.6 (default, Feb 21 2014, 21:09:35)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'

@anddam
Copy link

anddam commented Jun 9, 2014

@sashkab

System python doesn't come with python.app and observes exactly same behavior as one I built with homebrew.

You probably want to try system's pythonw interpreter for that.

@tacaswell tacaswell added this to the unassigned milestone Jul 12, 2014
@efiring
Copy link
Member

efiring commented Aug 18, 2014

I'm going to close this; the solution is to use pythonw if one has an installation (on OSX) that is not already making pythonw and python functionally identical. There is nothing we can do about it on the matplotlib side.

@efiring efiring closed this as completed Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants