How do I install GTK headers/dev package on Mac OS? - matplotlib

-Mac OSX 10.9 Mavericks -Python 2.7 -matplotlib 1.3
Hi,
I tried running matplotlib with the TKAgg backend, but ran into some issues, so I decided to try GTKAgg instead. I can do "import gtk", so I know GTK is properly installed on my machine. However, when I try "import matplotlib.pyplot as plt", I get the following error:
ImportError: No module named _backend_gdk
I went into my matplotlib/backends directory and couldn't find that module. It seems that I need to install the gtk dev package/headers for it to work properly. I've googled around and can't seem to find a good answer to how to go about doing this on Mac OS. Here are my questions:
1) I'm a bit unclear on the interplay between the gtk headers, gtk and matplotlib. Could someone briefly explain what exactly the headers do?
2) What is the best way to download this gtk dev package for Mac OS?
3) Will I need to uninstall and reinstall matplotlib so that it recognizes the headers?
Thank you
Mika

Related

Troubles installing Pandas on Mac Book Pro with M1 procesor

I switched from Windows NTB to MacBook Pro with M1. And I am not able to install Pandas, some issue with missing wheel for numpy. I am using Python 3.9. I went through various solutions presented here like this one below, but none work for me: https://stackoverflow.com/a/66048187/16324084
This one was one of the most explanatory, but I went through all steps, but when I run some code I will get this error message:
ModuleNotFoundError: No module named 'pandas'.
As I am new with Apple, no idea what is conda or roseta, so please can somebody write me what I should do to get Pandas installed and working? And please try to explain it as a small child, thanks.
I recommend you install Anaconda, a package manager. Instructions here. I have all of my packaged managed through this on my Big Sur m1 silicone MacBook pro and have not had issues since switching over from Intel.
Once you have installed anaconda, open terminal and run:
conda install pandas
More info on using anaconda here

Packaging with Pyinstaller - PyQt5 setStyle ignored

I'm actually have an similar issue as described here after update python, pyistaller, pyqt5, pyqt5-tools. Before I got the desired "Windows Vista-style" without app.setStyle('windowsvista') when I run the compiled stand-alone executable.
Now I got the Windows "Classic-style" instead. If I start the application in PyCharm it will use the desired "Windows Vista-style".
Currently installed on Win7 64bit:
Python : 3.6.4
PyInstaller: 3.3.1
PyQt5 : 5.10
pyqt5-tools: 5.9.0.1.2 (update to 5.9.1.1 doesn't work)
Does anyone have any idea why PyInstaller ignored the style?
The error seems to have been fixed in a unmerged branch of PyInstaller. More information can be found on the GitHub pull request conversation, but reinstalling PyInstaller using pip install https://github.com/bjones1/pyinstaller/archive/pyqt5_fix.zip fixed the same style issue for me on Mac.

No modules in Python 3.5.2

I've just installed Python 3.5.2 and I'm currently using Pycharm, when I go to settings to check the modules it has installed there is no modules at all (while python 2.7 has some modules installed). Why is this? I installed it in other PC very long ago and it had many modules by defult. Is there any way to fix this? I think I installed it properly so I don't know why this is happening.
Also when I execute python3 it says the command wasn't found (I don't know if this has something to do), I have to use python3.5 instead.
Please help me, thank you.

pyinstaller with matplotlib windows

I use pyinstaller in generate pythion program with matplotlib a exe file
The exe is generated well but when use the exe, there is a error said no module named 'tz'
what does it mean?
I have test the pythinstaller with program with numby and pyqt4 without matplotlib, it worksenter image description here well! )
I have find the solution on pyinstaller git hub provided by Cecil Curry.
It is:
This is a known issue. python-dateutil 2.5.0 is currently broken with respect to PyInstaller, unfortunately.
Until python-dateutil issues a new stable release correcting this, consider temporarily downgrading to python-dateutil 2.4.2. Apologies for the mild inconvenience – and thanks for taking the time to report this, nonetheless.
I have tested and it works

Using Anaconda Python 3.4 with PyQt5

I have an existing PyQt5/Python3.4 application that works great, and would now like to add "real-time" data graphing to it. Since matplotlib installation specifically looks for Python 3.2, and NumPhy / ipython each have there own Python version requirements, I thought I'd use a python distribution to avoid confusion.
But out of all the distros (pythonxy, winpython, canopy epd) Anaconda is the only one that supports Python 3.4, however it only has PyQt 4.10.4. Is there a way I can install Anaconda, and use matplotlib from within my existing PyQt5 gui app?
Would I be better off just using another charting package (pyqtgraph, pyqwt, guiqwt, chaco, etc) that might work out of the box with PyQt5/Python3.4?
I was able to install it from dsdale24's and asmeurer's channels but then, when trying to run a qt script with a QApplication object, I got an error message regarding to cocoa library not being found.
Then, following asmeurer's comment, I could install PyQt5 on anaconda with python 3.4 using the mmcauliffe package:
conda install -c https://conda.anaconda.org/mmcauliffe pyqt5
Now it works great!
We are working on adding pyqt5, but for now, you can install it from https://binstar.org/dsdale24/pyqt5.
conda config --add channels dsdale24
conda install pyqt5
create an env like this:
conda create –name my_env python=3.5 pyqt=5
works great.
I use Anaconda and with Python v2.7.X and qt5 doesn't work. The work-around I found was
Tools -> Preferences -> Python console -> External modules -> Library: PySlide