azdatasci
azdatasci

Reputation: 841

Python Matplotlib show() on Debian

I am running Debian 8.7 (Jessie) on a development laptop. I am just getting into Python development for some machine learning projects I am working on. I also have Python installed on a my main Mac OSX macbook as well.

While working on some examples, the OSX install, when using plt.show() (from Matplotlib/pyplot), a window will pop up with the plot. On the Debian laptop, however, I get nothing back. No errors, nothing. I changed the plt.show() command to just save the figure out to a file and that works.

I read some forums and posts that talk about installing ImageMagick and other tools. I have tried that, but that didn't seem to work. Another option was to change the "backends". I also read something about using "eog" instead of the xv or display provided by the base OS. The post is located here:

matplotlib does not show my drawings although I call pyplot.show()

I went through this process, but that doesn't seem to work either. I'm wondering if this has something to with the fact that I had to download, configure and make the Python 3.6.1 version I am running on the Linux side. I'm still a little new at Python, so I'm unsure how to solve this.

Info:

OS: Debian 8.7 (Debian) Python Version: 3.6.1 Packages Installed: pandas, matplotlib, bokeh, scikit-learn (and all the other major data science and machine learning libraries/packages). I used pip3.6 to install these, since the default python install is 2.7.9 on the OS.

Please let me know if there is more information needed. Thanks!

Upvotes: 0

Views: 509

Answers (1)

nrmb
nrmb

Reputation: 490

Have you tried checking whether you're using python 3.6 instead of the 2.7? Try checking your bashrc.

I had a similar problem before with seaborn because i was using 2.7 at first and changed to 3.6. I used spyder now so my default python and projects will not get confused. Or you could try Python Virtual Environment.

Upvotes: 1

Related Questions