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

optionally create pythonw link in virtualenv for framework python builds on osx #54

Open
vbabiy opened this Issue Mar 14, 2011 · 31 comments

Comments

Projects
None yet
@vbabiy
Contributor

vbabiy commented Mar 14, 2011

http://groups.google.com/group/python-virtualenv/browse_thread/thread/83fa4a12d22a30c8/744e19c194f1618a?#744e19c194f1618a details how wxpython might be enabled for python on OSX in virtualenvs by analogy with the way it currently works for win32 and cygwin installation modes.

Ian's previous discussion along these lines is here:
http://groups.google.com/group/python-virtualenv/browse_thread/thread/b119a3c26aa49238
and the code that does it at the moment is listed here:
http://github.com/gldnspud/virtualenv-pythonw-osx/

Can we get this baked into the core distribution? What would need to change about the approach?


@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 14, 2011

Contributor

note, possibly duplicates #47, but the issue there is a bit more muddier.


Original Comment By: dan mackinlay
Contributor

vbabiy commented Mar 14, 2011

note, possibly duplicates #47, but the issue there is a bit more muddier.


Original Comment By: dan mackinlay
@gregglind

This comment has been minimized.

Show comment
Hide comment
@gregglind

gregglind Dec 30, 2011

+1 on this.

What is the ".Python" directory that wants linking in
http://github.com/gldnspud/virtualenv-pythonw-osx/ ? I don't see any .Python my venv.

Instead, I see this:

 (py27) $ laf /Users/glind/venvs/py27//include/python2.7
 /Users/glind/venvs/py27//include/python2.7@ -> /usr/local/Cellar/python/2.7.2/include/python2.7
 (py27) $ which python
 /Users/glind/venvs/py27/bin/python

This bug manifests in various ways:

http://stackoverflow.com/questions/3692928/why-doesnt-the-save-button-work-on-a-matplotlib-plot
http://code.google.com/p/iterm2/issues/detail?id=1680

gregglind commented Dec 30, 2011

+1 on this.

What is the ".Python" directory that wants linking in
http://github.com/gldnspud/virtualenv-pythonw-osx/ ? I don't see any .Python my venv.

Instead, I see this:

 (py27) $ laf /Users/glind/venvs/py27//include/python2.7
 /Users/glind/venvs/py27//include/python2.7@ -> /usr/local/Cellar/python/2.7.2/include/python2.7
 (py27) $ which python
 /Users/glind/venvs/py27/bin/python

This bug manifests in various ways:

http://stackoverflow.com/questions/3692928/why-doesnt-the-save-button-work-on-a-matplotlib-plot
http://code.google.com/p/iterm2/issues/detail?id=1680

gregglind added a commit to gregglind/virtualenv that referenced this issue Jan 1, 2012

Incorporates virtualenv-pythonw-osx #54
*  makes Framework bundle virtualenvs play nicer with
   OSX widgets
*  based on work at https://github.com/gldnspud/virtualenv-pythonw-osx
*  Needs code review (fragile, path based, uses tmpfiles)

TODO:

*  What is the general fix for this for non-Framework installs?
@gregglind

This comment has been minimized.

Show comment
Hide comment
@gregglind

gregglind Jan 1, 2012

The reason there was no .Python was because in my initial I was venving from a brew install python. Only brew install python --framework and other Framework installs get the .Python dynlib.

gregglind commented Jan 1, 2012

The reason there was no .Python was because in my initial I was venving from a brew install python. Only brew install python --framework and other Framework installs get the .Python dynlib.

gregglind added a commit to gregglind/virtualenv that referenced this issue Jan 2, 2012

install_name_tool in OSX Framework builds #168
shouldfix:  creating a virtualenv from an OSX
Framework build should no longer require XCode to
run successfully.

implementaion:  if ``install_name_tool`` missing,
download binaries from macosxforge, and install
them to a temp directory

rejected:  download and compile .c source.

TODOS:

*   review for python2/3 issues
*   cleanup of tempfiles?  Assume the system will do it?
*   test for robustness
*   review implications of not having XCode for packages, if any
*   integrate with #54 pull or its descendents.  (trivial)

Possible Test Code:

    #!/bin/sh

    deactivate # virtualenv on system (Framework) python

    # assuming I have XCode or ``install_name_tool`` in path.
    python virtualenv.py t_install_name_tool  # creates with no issue
    t_install_name_tool/bin/python -c ""

    # remove it from path
    sudo mv /usr/bin/install_name_tool{,2}

    # should create with no issue, using tmpfile
    python virtualenv.py t_tmp_install_name_tool
    t_tmp_install_name_tool/bin/python -c ""

    # clean up
    sudo mv /usr/bin/install_name_tool{2,}
    command rm -rf t_{,tmp_}install_name_tool

gorakhargosh added a commit to gorakhargosh/virtualenv that referenced this issue Mar 13, 2012

install_name_tool in OSX Framework builds #168
shouldfix:  creating a virtualenv from an OSX
Framework build should no longer require XCode to
run successfully.

implementaion:  if ``install_name_tool`` missing,
download binaries from macosxforge, and install
them to a temp directory

rejected:  download and compile .c source.

TODOS:

*   review for python2/3 issues
*   cleanup of tempfiles?  Assume the system will do it?
*   test for robustness
*   review implications of not having XCode for packages, if any
*   integrate with #54 pull or its descendents.  (trivial)

Possible Test Code:

    #!/bin/sh

    deactivate # virtualenv on system (Framework) python

    # assuming I have XCode or ``install_name_tool`` in path.
    python virtualenv.py t_install_name_tool  # creates with no issue
    t_install_name_tool/bin/python -c ""

    # remove it from path
    sudo mv /usr/bin/install_name_tool{,2}

    # should create with no issue, using tmpfile
    python virtualenv.py t_tmp_install_name_tool
    t_tmp_install_name_tool/bin/python -c ""

    # clean up
    sudo mv /usr/bin/install_name_tool{2,}
    command rm -rf t_{,tmp_}install_name_tool

The original patch was cleaned up, tested against
at Python 2.5, 2.6, 2.7, 3.2, and verified to work.

Signed-off-by: Yesudeep Mangalapilly <yesudeep@google.com>
@nils-werner

This comment has been minimized.

Show comment
Hide comment
@nils-werner

nils-werner Mar 6, 2015

A fix for this in sight? I still have the issue with shy Matplotlib windows

nils-werner commented Mar 6, 2015

A fix for this in sight? I still have the issue with shy Matplotlib windows

@nils-werner

This comment has been minimized.

Show comment
Hide comment
@nils-werner

nils-werner Nov 24, 2015

This issue is 4,5 years old and requires ugly hacks to make matplotlib run on Mac OSX. Can we please fix this?

nils-werner commented Nov 24, 2015

This issue is 4,5 years old and requires ugly hacks to make matplotlib run on Mac OSX. Can we please fix this?

@stlk

This comment has been minimized.

Show comment
Hide comment
@stlk

stlk Nov 29, 2015

I second this. I installed python 2.7 and then created virtualenv using following commands:

brew install python --framework
virtualenv env
source env/bin/activate
pip install matplotlib

But I get following message when I try to import matplotlib.pyplot.

Python 2.7.10 (default, Aug 22 2015, 20:33:39)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin
>>> import matplotlib.pyplot as plt
...
    from matplotlib.backends import _macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ

Workaround mentioned by @nils-werner works. But its huge blocker for beginners who want to work with matplotlib(not only) in jupyter notebook in virtualenv.

I wrote detailed guide how to work around this issue, http://blog.rousek.name/2015/11/29/adventure-with-matplotlib-virtualenv-and-macosx/

stlk commented Nov 29, 2015

I second this. I installed python 2.7 and then created virtualenv using following commands:

brew install python --framework
virtualenv env
source env/bin/activate
pip install matplotlib

But I get following message when I try to import matplotlib.pyplot.

Python 2.7.10 (default, Aug 22 2015, 20:33:39)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin
>>> import matplotlib.pyplot as plt
...
    from matplotlib.backends import _macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ

Workaround mentioned by @nils-werner works. But its huge blocker for beginners who want to work with matplotlib(not only) in jupyter notebook in virtualenv.

I wrote detailed guide how to work around this issue, http://blog.rousek.name/2015/11/29/adventure-with-matplotlib-virtualenv-and-macosx/

@terrycojones

This comment has been minimized.

Show comment
Hide comment
@terrycojones

terrycojones Nov 29, 2015

Ugh....... I just hit this as well, following an upgrade to matplotlib 1.5 (which now fails to import a backend, as documented above by @stlk). I'm using a brew installed python 3.5.

terrycojones commented Nov 29, 2015

Ugh....... I just hit this as well, following an upgrade to matplotlib 1.5 (which now fails to import a backend, as documented above by @stlk). I'm using a brew installed python 3.5.

@thomasdziedzic

This comment has been minimized.

Show comment
Hide comment
@thomasdziedzic

thomasdziedzic Nov 30, 2015

Was going through an intro to visualization using python chapter, and I can't even begin writing the first code sample in jupyter because I keep hitting this issue on a mac... I'm using the system python that comes with mac + virtualenv.

thomasdziedzic commented Nov 30, 2015

Was going through an intro to visualization using python chapter, and I can't even begin writing the first code sample in jupyter because I keep hitting this issue on a mac... I'm using the system python that comes with mac + virtualenv.

@mturilli

This comment has been minimized.

Show comment
Hide comment
@mturilli

mturilli commented Dec 14, 2015

+1

@arsenico13

This comment has been minimized.

Show comment
Hide comment
@arsenico13

arsenico13 Jan 3, 2016

+1
Oh god....
issue from 2011.. still not fixed.

arsenico13 commented Jan 3, 2016

+1
Oh god....
issue from 2011.. still not fixed.

@tjanson

This comment has been minimized.

Show comment
Hide comment
@tjanson

tjanson Jan 31, 2016

For the mean time, the utility that’s linked in this issue (and on the FAQ) still worked for me:

$ # install the utility
$ pip install git+https://github.com/gldnspud/virtualenv-pythonw-osx.git
$ # enter the virtualenv with virtualenvwrapper (or manually)
$ workon my-venv
$ # double-check that this is your venv Python binary
$ which python
/Users/macbook/.virtualenvs/my-venv/bin/python
$ # fix it, using magic
$ fix-osx-virtualenv `which python`/../..

Yes, it’s quite simple, but took me a while to figure out. I have no idea what this does, but as a result Matplotlib works by simply invoking it using that venv Python binary – no need for a wrapper shell function.

tjanson commented Jan 31, 2016

For the mean time, the utility that’s linked in this issue (and on the FAQ) still worked for me:

$ # install the utility
$ pip install git+https://github.com/gldnspud/virtualenv-pythonw-osx.git
$ # enter the virtualenv with virtualenvwrapper (or manually)
$ workon my-venv
$ # double-check that this is your venv Python binary
$ which python
/Users/macbook/.virtualenvs/my-venv/bin/python
$ # fix it, using magic
$ fix-osx-virtualenv `which python`/../..

Yes, it’s quite simple, but took me a while to figure out. I have no idea what this does, but as a result Matplotlib works by simply invoking it using that venv Python binary – no need for a wrapper shell function.

@nils-werner

This comment has been minimized.

Show comment
Hide comment
@nils-werner

nils-werner Jan 31, 2016

I know this solution but:

  • You need to repeat (and remember how to do so) it for all your virtualenvs
  • It makes it impossible to build certain external modules or when using CFFI or something (will need to go check what it was exactly)

nils-werner commented Jan 31, 2016

I know this solution but:

  • You need to repeat (and remember how to do so) it for all your virtualenvs
  • It makes it impossible to build certain external modules or when using CFFI or something (will need to go check what it was exactly)
@RobertCoop

This comment has been minimized.

Show comment
Hide comment
@RobertCoop

RobertCoop Feb 10, 2016

It doesn't feel like an ideal solution, but an easy workaround is to use virtualenvwrapper and then use the hooks to configure things. Install virtualenv-pythonw-osx and virtualevnwrapper, source the virtualenvwrapper.sh file in order to create the hook scripts, then add the following to the postactivate script:

if [ ! -d $VIRTUAL_ENV/Python.app ]; then
  echo Fixing OSX Python display issues...
  fix-osx-virtualenv $VIRTUAL_ENV
fi

This will automatically fix any virtual environment when you activate them via the workon command

RobertCoop commented Feb 10, 2016

It doesn't feel like an ideal solution, but an easy workaround is to use virtualenvwrapper and then use the hooks to configure things. Install virtualenv-pythonw-osx and virtualevnwrapper, source the virtualenvwrapper.sh file in order to create the hook scripts, then add the following to the postactivate script:

if [ ! -d $VIRTUAL_ENV/Python.app ]; then
  echo Fixing OSX Python display issues...
  fix-osx-virtualenv $VIRTUAL_ENV
fi

This will automatically fix any virtual environment when you activate them via the workon command

@grantstephens

This comment has been minimized.

Show comment
Hide comment
@grantstephens

grantstephens commented Mar 31, 2016

+1

kaiyuzhao referenced this issue in kaiyuzhao/SFrame Apr 28, 2016

Dot plot scatter plot implementation
1. Exposed matplotlib scatter plot API to the user via kwargs
2. added large scale scatter plot support
3. parameterized heatmap streaming aggregator

In progress:
1. bar chart is still in progress

TODOs:

1. need to remove numpy dependency
2. need to support customizable view style
3. need to support user defined point size for large scale plot
@iannesbitt

This comment has been minimized.

Show comment
Hide comment
@iannesbitt

iannesbitt commented May 7, 2016

+1

@bmaher74

This comment has been minimized.

Show comment
Hide comment
@bmaher74

bmaher74 commented May 12, 2016

+1

@visualmotive

This comment has been minimized.

Show comment
Hide comment
@visualmotive

visualmotive May 30, 2016

Just hit this bug, too. The workaround suggested are not exactly elegant. Would be great to get fixed!

visualmotive commented May 30, 2016

Just hit this bug, too. The workaround suggested are not exactly elegant. Would be great to get fixed!

@wwp3

This comment has been minimized.

Show comment
Hide comment
@wwp3

wwp3 Jun 2, 2016

Try changing the matplotlib backend to get matplotlib to work in a virtual environment:

There are (at least) two solutions I've used, with some additional methods included below. Both outlined here should to the same thing with a slightly different approach:

If you already installed matplotlib using pip on your virtual environment, you can...

1. Add a new matplotlibrc file for your virtual environment
For example, in your virtual environment run:

$ cd ~/.matplotlib
$ nano matplotlibrc #to create file using nano

Write backend: TkAgg in the file and save upon exit. You should be good to go.

_OR_

2. Edit the matplotlibrc file referenced by your virtual environment
In your virtual environment, open a python shell and run:

import matplotlib
matplotlib.matplotlib_fname()
'/home/foo/.config/matplotlib/matplotlibrc'

Note/Update: if you get a syntax error in your virtual environment, you might need to simply run:

import matplotlib
matplotlib.matplotlib_fname()

This displays the matplotlibrc file referenced by the matplotlib package in your virtual environment. Follow the path and open the matplotlibrc file. Edit the file's backend tag to read backend: TkAgg and save

[Also - A third approach]
Haven't tried before, but according to documentation you should be able to define the backend upon import of matplotlib if you don't want to change the backend in the script itself:

import matplotlib
matplotlib.use('TkAgg')

(see sources below for further explanation and additional methods)

Sources:
[1] http://matplotlib.org/faq/usage_faq.html#what-is-a-backend
[2] http://matplotlib.org/users/customizing.html#customizing-matplotlib
[3] http://stackoverflow.com/questions/4130355/python-matplotlib-framework-under-macosx
[4] http://stackoverflow.com/questions/29433824/unable-to-import-matplotlib-pyplot-as-plt-in-virtualenv

wwp3 commented Jun 2, 2016

Try changing the matplotlib backend to get matplotlib to work in a virtual environment:

There are (at least) two solutions I've used, with some additional methods included below. Both outlined here should to the same thing with a slightly different approach:

If you already installed matplotlib using pip on your virtual environment, you can...

1. Add a new matplotlibrc file for your virtual environment
For example, in your virtual environment run:

$ cd ~/.matplotlib
$ nano matplotlibrc #to create file using nano

Write backend: TkAgg in the file and save upon exit. You should be good to go.

_OR_

2. Edit the matplotlibrc file referenced by your virtual environment
In your virtual environment, open a python shell and run:

import matplotlib
matplotlib.matplotlib_fname()
'/home/foo/.config/matplotlib/matplotlibrc'

Note/Update: if you get a syntax error in your virtual environment, you might need to simply run:

import matplotlib
matplotlib.matplotlib_fname()

This displays the matplotlibrc file referenced by the matplotlib package in your virtual environment. Follow the path and open the matplotlibrc file. Edit the file's backend tag to read backend: TkAgg and save

[Also - A third approach]
Haven't tried before, but according to documentation you should be able to define the backend upon import of matplotlib if you don't want to change the backend in the script itself:

import matplotlib
matplotlib.use('TkAgg')

(see sources below for further explanation and additional methods)

Sources:
[1] http://matplotlib.org/faq/usage_faq.html#what-is-a-backend
[2] http://matplotlib.org/users/customizing.html#customizing-matplotlib
[3] http://stackoverflow.com/questions/4130355/python-matplotlib-framework-under-macosx
[4] http://stackoverflow.com/questions/29433824/unable-to-import-matplotlib-pyplot-as-plt-in-virtualenv

@visualmotive

This comment has been minimized.

Show comment
Hide comment
@visualmotive

visualmotive Jun 2, 2016

@wwp3 Great write-up, thanks! I have had good luck with this option:

import matplotlib
matplotlib.use('TkAgg')

visualmotive commented Jun 2, 2016

@wwp3 Great write-up, thanks! I have had good luck with this option:

import matplotlib
matplotlib.use('TkAgg')
@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen Jul 15, 2016

Working on improving the Matplotlib docs for this issue @stlk any objections to using part of your guide for the fix to the Jupyter notebook issue (We already have the terminal python/ipython covered )

jenshnielsen commented Jul 15, 2016

Working on improving the Matplotlib docs for this issue @stlk any objections to using part of your guide for the fix to the Jupyter notebook issue (We already have the terminal python/ipython covered )

@stlk

This comment has been minimized.

Show comment
Hide comment
@stlk

stlk Jul 15, 2016

@jenshnielsen Feel free to use it, I'm happy it's helpful.

stlk commented Jul 15, 2016

@jenshnielsen Feel free to use it, I'm happy it's helpful.

@jucor

This comment has been minimized.

Show comment
Hide comment
@jucor

jucor commented Aug 22, 2016

+1

@mattayes

This comment has been minimized.

Show comment
Hide comment
@mattayes

mattayes Oct 20, 2016

Is this solved? If so, can someone close the issue?

mattayes commented Oct 20, 2016

Is this solved? If so, can someone close the issue?

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen commented Oct 21, 2016

It's not

@nils-werner

This comment has been minimized.

Show comment
Hide comment
@nils-werner

nils-werner Oct 25, 2016

Absolutely not. It is worse than ever before as it crashes on import. Steps to reproduce

virtualenv test
source test/bin/activate
pip install matplotlib
python -c "import matplotlib.pyplot; print 'import succeeded'"

nils-werner commented Oct 25, 2016

Absolutely not. It is worse than ever before as it crashes on import. Steps to reproduce

virtualenv test
source test/bin/activate
pip install matplotlib
python -c "import matplotlib.pyplot; print 'import succeeded'"
@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Oct 25, 2016

Member

Is there a PR that fixes this? If so, have the people encountering the issue tested it and confirms that it resolves the problem? If there isn't, is anyone working on one? It's going to be more or less impossible for anyone who can't reproduce the issue (which needs, I guess, an OSX installation at a minimum to do) to develop a fix, so we're relying on contributions here.

@nils-werner thanks for the clear description of how to reproduce. If you could add environment details (all I see in the thread is "OSX", but nothing specific about whether it's all versions, what version of virtualenv and python and how they were installed, whether certain other things need to be installed, how to install them, etc) that would be helpful as well.

Then hopefully someone with access to a suitable environment can produce a PR and reference it here. At that stage, we can review the PR and take it from there.

Member

pfmoore commented Oct 25, 2016

Is there a PR that fixes this? If so, have the people encountering the issue tested it and confirms that it resolves the problem? If there isn't, is anyone working on one? It's going to be more or less impossible for anyone who can't reproduce the issue (which needs, I guess, an OSX installation at a minimum to do) to develop a fix, so we're relying on contributions here.

@nils-werner thanks for the clear description of how to reproduce. If you could add environment details (all I see in the thread is "OSX", but nothing specific about whether it's all versions, what version of virtualenv and python and how they were installed, whether certain other things need to be installed, how to install them, etc) that would be helpful as well.

Then hopefully someone with access to a suitable environment can produce a PR and reference it here. At that stage, we can review the PR and take it from there.

@tjanson

This comment has been minimized.

Show comment
Hide comment
@tjanson

tjanson Oct 25, 2016

@pfmoore I have been using the workaround in my earlier comment, which still consistently works for me. – Though I’m not sure how that works. Also see the following comment by @nils-werner.

(For the record: OS X 10.11.6, Python 3.5.2, matplotlib-1.5.3.)

tjanson commented Oct 25, 2016

@pfmoore I have been using the workaround in my earlier comment, which still consistently works for me. – Though I’m not sure how that works. Also see the following comment by @nils-werner.

(For the record: OS X 10.11.6, Python 3.5.2, matplotlib-1.5.3.)

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen Oct 25, 2016

@nils-werner The only reason it's worse it that we explicitly check for a framework build before running the OSX backend in Matplotlib https://github.com/matplotlib/matplotlib/blob/master/src/_macosx.m#L3071

The alternative is a soft failure where the gui is only partially functional.

WXPython has a similar check build in which prevents you from using WXPython from a non framework build.

The best workaround is to use venv from the standard library if you are using python3
Unlike virtualenv that works correctly.
http://matplotlib.org/devdocs/faq/osx_framework.html#introduction

jenshnielsen commented Oct 25, 2016

@nils-werner The only reason it's worse it that we explicitly check for a framework build before running the OSX backend in Matplotlib https://github.com/matplotlib/matplotlib/blob/master/src/_macosx.m#L3071

The alternative is a soft failure where the gui is only partially functional.

WXPython has a similar check build in which prevents you from using WXPython from a non framework build.

The best workaround is to use venv from the standard library if you are using python3
Unlike virtualenv that works correctly.
http://matplotlib.org/devdocs/faq/osx_framework.html#introduction

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Oct 25, 2016

Member

OK, so I guess if no-one is working on a PR, the resolution here is either:

  1. If you're on Python 3, use stdlib venv
  2. Otherwise, use the workaround noted.

Cool. I'm not sure if it's worth leaving the issue open in that case - there's a clear workaround, and any code fix would be a new PR anyway. I suggest we close the issue - comments?

Member

pfmoore commented Oct 25, 2016

OK, so I guess if no-one is working on a PR, the resolution here is either:

  1. If you're on Python 3, use stdlib venv
  2. Otherwise, use the workaround noted.

Cool. I'm not sure if it's worth leaving the issue open in that case - there's a clear workaround, and any code fix would be a new PR anyway. I suggest we close the issue - comments?

@aleksijohansson

This comment has been minimized.

Show comment
Hide comment
@aleksijohansson

aleksijohansson Apr 11, 2018

Any updates on this? It would be nice to have this fixed instead of having to use workarounds.

aleksijohansson commented Apr 11, 2018

Any updates on this? It would be nice to have this fixed instead of having to use workarounds.

@ashishprajapati

This comment has been minimized.

Show comment
Hide comment
@ashishprajapati

ashishprajapati May 28, 2018

@wwp3 Great, thanks! I successfully fixed it with this option:

  1. Add a new matplotlibrc file for your virtual environment
    For example, in your virtual environment run:

$ cd ~/.matplotlib
$ nano matplotlibrc #to create file using nano
Write backend: TkAgg in the file and save upon exit. You should be good to go.

ashishprajapati commented May 28, 2018

@wwp3 Great, thanks! I successfully fixed it with this option:

  1. Add a new matplotlibrc file for your virtual environment
    For example, in your virtual environment run:

$ cd ~/.matplotlib
$ nano matplotlibrc #to create file using nano
Write backend: TkAgg in the file and save upon exit. You should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment