FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Python version specific matplotlibrc · Issue #10376 · matplotlib/matplotlib · GitHub

Repository navigation

Python version specific matplotlibrc #10376

Closed

Description

Bug report

Bug summary

There should be a way to use different config files for different python versions, or at least specify different backends for different versions. I have PyQt5 installed for python3, so I prefer to set my backend to Qt5Agg. But occasionally I want to run something in python2 for testing or compatibility purposes. I don't want to waste time and space installing PyQt5 on python2, so I want the backend to stay TkAgg. A workaround is to change the config files in the matplotlib installation, but these will be overwritten on the next install.

Activity

  1. QuLogic commented on Feb 4, 2018

    Member

    You could use the MPLBACKEND environment variable to do that, e.g., if you're using bash, then alias pympl2='MPLBACKEND=TkAgg python2' could work.

  2. rmccampbell commented on Feb 4, 2018

    Author

    I'm on windows (I could accomplish the same with a bash script) but I would much rather avoid using aliases if possible. By the time I remember I forgot to use the alias I might as well just call mpl.use('TkAgg').

  3. added this to the milestone on Feb 4, 2018
  4. tacaswell commented on Feb 4, 2018

    Member

    This would fit with in @anntzer 's advocacy to have the configuration just be a python script.

    With our current system this would be a pretty big jump in complexity.

  5. anntzer commented on Feb 5, 2018

    Contributor
    1. Backend switching #9795 would also solve (in another manner) the OP's problem.
    2. You can put a matplotlibrc in the site-packages folder (which is different for each Python version) although it's a bit of a hack (see docs).
    3. As mentioned by Tom, pure Python mplrcs would also make this trivial.
  6. modified the milestones: v3.0, needs sorting on Jul 26, 2018
  7. timhoffm commented on Jul 16, 2020

    Member

    The original use-case has become obsolete due to dropping of Python 2 support. Please reopen if this is still a desirable feature.

  8. removed this from the future releases milestone on Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL