Skip to content

ApplePersistenceIgnoreState warning in python3 #24424

@cbrnr

Description

@cbrnr

Using python3, there seem to be problems with using certain Python packages and the application resume feature of recent macOS versions. Specifically, whenever I import matplotlib.plyplot or run the magic command %matplotlib in IPython, I get the following warning message:

2018-02-22 10:35:38.287 Python[4145:281298] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)

There's an issue in the matplotlib repo, but I don't think this problem can be fixed by matplotlib. Instead, according to this SO post, the following command fixes the behavior:

defaults write org.python.python ApplePersistenceIgnoreState NO

Maybe this should be included in the python3 formula since many people seem to be annoyed by this message.

To reproduce:

  1. brew install python3
  2. pip3 install ipython matplotlib
  3. ipython
  4. %matplotlib
  5. This leads to the warning message mentioned above.

Expected behavior:

  • The warning message in step 5 should not be issued.

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

~  brew gist-logs python3
Error: No logs.
~  brew config
HOMEBREW_VERSION: 1.5.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: 021fe22e3c982b08346422d1e7897e929a709380
Last commit: 12 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 2ac975cd3e38bf08e7507cf602dbe42537881cf4
Core tap last commit: 78 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GITHUB_API_TOKEN: set
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.0 build 900
Git: 2.14.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.5.0_2/bin/ruby
Java: N/A
macOS: 10.13.3-x86_64
Xcode: 9.2
CLT: 9.2.0.0.1.1510905681
X11: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions