You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macosx broken on python 3.4 non-framework builds, shaky on framework #3367
and with this, the plot seems OK, except that it doesn't always register the "enter" event; when the window is selected, moving the cursor from outside to inside sometimes triggers interactivity (the cursor position is shown when inside the axes), but sometimes it doesn't. Moving the cursor inside more slowly seems to help, but it is not very predictable. This flakiness is confirmed with mpl 1.4.0rc3 using homebrew python3.4 with pip-installed ipython; these now link to the framework build.
I was not successful in building mpl from git in the Anaconda environment; shared libraries were not found. Therefore I have not tested the rc3 with the Anaconda default python 3.4.
Although it is better on 2.7, I think it still has known problems and major limitations with non-framework builds. Abandoning it would be unfortunate--it is the only interactive backend that is always available on the Mac, without requiring installation of some other enormous and problematic package (e.g., TkTcl, PyQt4, PySide).
Progress: it seems that Anaconda is inconsistent, and the intention is for ipython to be run under a framework, but this is not yet happening in 3.4. Chris Barkier and I are still arguing for the framework simply to be the standard python there, so that the ipython script would not have to do anything special, wx apps would work, etc.
@mdhoon, the "flakiness" that I noted even with the framework python occurs in 2.7 and 3.4--but only when the cursor is moving between my terminal window and the plot window, not when it enters the plot window from the desktop background. So, there is some sort of interaction between the terminal app and the plot window. It is in the "minor irritation" category, but if you can think of a way of fixing it with a small change in the macosx backend, that would be good.
@mdhoon, another question: Is there an easy way to detect at runtime whether mpl is in a python framework build? If there is, then at the very least a warning could be generated if the macosx backend is loaded.
I have a vague recollection of attempts to detect the framework build back
during the sprints for SciPy 2013. Maybe there is something in the mailing
list archives on that?
@mdhoon, another question: Is there an easy way to detect at runtime
whether mpl is in a python framework build? If there is, then at the very
least a warning could be generated if the macosx backend is loaded.
—
Reply to this email directly or view it on GitHub #3367 (comment)
.
@efiring : Previously we had a runtime check to see if Python is a framework build, but it turned out not to be reliable; see issue #665 . In Python 2 there is a MacOS module that can be used instead:
$ python
Python 2.7.6 (default, Jan 20 2014, 14:59:13)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import MacOS
MacOS.linkmodel
'framework'
but this module has disappeared in Python 3:
$ python3.4
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import MacOS
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'MacOS'
Currently we are checking at compile-time whether we have a framework build (by checking for WITH_NEXT_FRAMEWORK in the C code; this variable is declared in pyconfig.h).
Since Python 2.7 and 3.2, the information in pyconfig.h is accessible from Python through the sysconfig module. So there we can do:
Do we still support Python 3.0 and 3.1? If so, somebody needs to check which of these methods work there. If not, then we can use these methods to check at run-time if we are using a framework build.
It would be good also if you guys can also check if these methods give the correct answer on your machines.
@efiring : I have not noticed any flakiness with the macosx backend with regular python. If this problem occurs with ipython only, the origin may lie there.
@ivanov sorry to keep bothering you, Ybut you are a known ipython/mpl connection. Can you bring this to the attention of the proper people in ipython land?
We do not support Python 3.0 or 3.1, so using sysconfig is OK.
Homebrew python 3.4.1 yields
In [2]: print(sysconfig.get_config_var('WITH_NEXT_FRAMEWORK'))
1
but Anaconda 2.7 and 3.4 both yield 0. Presumably this means that even though Anaconda 2.7 has a python.app, it is somehow not a true framework build.
I note that homebrew sysconfig.get_config_var('CONFIG_ARGS') includes '--enable-framework=/usr/local/Cellar/python3/3.4.1/Frameworks' but Anaconda's does not.
3) The "flakiness" that I mentioned--the interaction with the terminal, in which moving the cursor from the terminal into the plot window doesn't always activate the interactivity of the plot window--occurs from the plain python prompt, so it is not an ipython-specific problem. It might be related to my terminal configuration, which includes "focus follows mouse" for moves from one terminal window to another.
I have removed the release_critical label because I think the Anaconda-specific problem will be solved promptly by Anaconda. There are still a bunch of problems floating around:
The interaction with terminal. Minor. One can live with it.
Possible problems in setting default backend: It doesn't look like we can sort all this out quickly, if at all, so I don't think it should block a release.
Ipython problem on Mavericks with qt: severe, and affects us badly, but it looks like entirely an ipython problem at this point; it occurs even when mpl has not been imported.
This seems to have been a combination of up-stream issues. I am tagging at as such an closing as the ipython PRs have been merged and anaconda builds have been updated.
Activity
tacaswell commentedon Aug 14, 2014
@mdehoon any thoughts?
If we are going the drop-osx-backend route, I assume we should only do it for python3?
efiring commentedon Aug 14, 2014
Although it is better on 2.7, I think it still has known problems and major limitations with non-framework builds. Abandoning it would be unfortunate--it is the only interactive backend that is always available on the Mac, without requiring installation of some other enormous and problematic package (e.g., TkTcl, PyQt4, PySide).
efiring commentedon Aug 15, 2014
Progress: it seems that Anaconda is inconsistent, and the intention is for ipython to be run under a framework, but this is not yet happening in 3.4. Chris Barkier and I are still arguing for the framework simply to be the standard python there, so that the ipython script would not have to do anything special, wx apps would work, etc.
efiring commentedon Aug 15, 2014
@mdhoon, the "flakiness" that I noted even with the framework python occurs in 2.7 and 3.4--but only when the cursor is moving between my terminal window and the plot window, not when it enters the plot window from the desktop background. So, there is some sort of interaction between the terminal app and the plot window. It is in the "minor irritation" category, but if you can think of a way of fixing it with a small change in the macosx backend, that would be good.
efiring commentedon Aug 15, 2014
@mdhoon, another question: Is there an easy way to detect at runtime whether mpl is in a python framework build? If there is, then at the very least a warning could be generated if the macosx backend is loaded.
WeatherGod commentedon Aug 15, 2014
I have a vague recollection of attempts to detect the framework build back
during the sprints for SciPy 2013. Maybe there is something in the mailing
list archives on that?
On Thu, Aug 14, 2014 at 8:15 PM, Eric Firing notifications@github.com
wrote:
mdehoon commentedon Aug 15, 2014
@efiring : Previously we had a runtime check to see if Python is a framework build, but it turned out not to be reliable; see issue #665 . In Python 2 there is a MacOS module that can be used instead:
$ python
Python 2.7.6 (default, Jan 20 2014, 14:59:13)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
but this module has disappeared in Python 3:
$ python3.4
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Currently we are checking at compile-time whether we have a framework build (by checking for WITH_NEXT_FRAMEWORK in the C code; this variable is declared in pyconfig.h).
Since Python 2.7 and 3.2, the information in pyconfig.h is accessible from Python through the sysconfig module. So there we can do:
Do we still support Python 3.0 and 3.1? If so, somebody needs to check which of these methods work there. If not, then we can use these methods to check at run-time if we are using a framework build.
It would be good also if you guys can also check if these methods give the correct answer on your machines.
mdehoon commentedon Aug 15, 2014
@efiring : I have not noticed any flakiness with the macosx backend with regular python. If this problem occurs with ipython only, the origin may lie there.
tacaswell commentedon Aug 15, 2014
@ivanov sorry to keep bothering you, Ybut you are a known ipython/mpl connection. Can you bring this to the attention of the proper people in ipython land?
efiring commentedon Aug 15, 2014
@mdehoon,
but Anaconda 2.7 and 3.4 both yield
0. Presumably this means that even though Anaconda 2.7 has a python.app, it is somehow not a true framework build.I note that homebrew
sysconfig.get_config_var('CONFIG_ARGS')includes'--enable-framework=/usr/local/Cellar/python3/3.4.1/Frameworks'but Anaconda's does not.3) The "flakiness" that I mentioned--the interaction with the terminal, in which moving the cursor from the terminal into the plot window doesn't always activate the interactivity of the plot window--occurs from the plain python prompt, so it is not an ipython-specific problem. It might be related to my terminal configuration, which includes "focus follows mouse" for moves from one terminal window to another.
[TAC, edit to fix medhoon's user id]
efiring commentedon Aug 15, 2014
I have removed the release_critical label because I think the Anaconda-specific problem will be solved promptly by Anaconda. There are still a bunch of problems floating around:
efiring commentedon Aug 15, 2014
The revised Anaconda ipython for 3.4 is out, and it works.
efiring commentedon Aug 15, 2014
Regarding problem 3 above, see ipython/ipython#6189.
tacaswell commentedon Aug 17, 2014
This seems to have been a combination of up-stream issues. I am tagging at as such an closing as the ipython PRs have been merged and anaconda builds have been updated.