You can also install miniconda and use conda to install only the packages you need. Anaconda is just a pre-packaging of the most useful packages so you don't have to install most things.
Aaron Meurer On Tue, Feb 11, 2020 at 4:05 AM David Bailey <[email protected]> wrote: > > On 10/02/2020 18:43, Aaron Meurer wrote: > > SymPy also comes with Anaconda. Anaconda basically installs a > completely separate Python installation, but as long as the same > installation includes SymPy and matplotlib they will be able to work > with each other. > > The issue is that things like tkinter or qt that are needed for > matplotlib plotting are not Python packages but rather C libraries, so > pip cannot install them. The conda package manager that comes with > Anaconda is much better at installing those things, especially on > Windows. I would also suggest using conda-forge, which includes even > more packages. > > I would also mention that if you don't care about interaction, the > easiest way to use matplotlib is in the Jupyter notebook with > '%matplotlib inline'. > > On 10/02/2020 18:43, Aaron Meurer wrote: > > SymPy also comes with Anaconda. Anaconda basically installs a > completely separate Python installation, but as long as the same > installation includes SymPy and matplotlib they will be able to work > with each other. > > The issue is that things like tkinter or qt that are needed for > matplotlib plotting are not Python packages but rather C libraries, so > pip cannot install them. The conda package manager that comes with > Anaconda is much better at installing those things, especially on > Windows. I would also suggest using conda-forge, which includes even > more packages. > > I would also mention that if you don't care about interaction, the > easiest way to use matplotlib is in the Jupyter notebook with > '%matplotlib inline'. > > Thanks Aaron, but I took a look at Anaconda, hoping that it was a better > version of pip, but it is a huge sprawling package weighing in at almost 1 > Gigabyte of storage - even in its compressed form. It seems to want to take > over my entire python experience. I'd really like to know how SymPy manages > to use Matplotlib to create plots, which it does correctly using my current > python setup, and which would presumably solve the problem. > > I have already tried executing matplotlib.use("Qt5Agg"), which Oscar > recommended some time back and which got SymPy plots working nicely under > 64-bit Windows 10. > > I chose to test a very simple test program from the Matplotlib examples: > > import matplotlib > import matplotlib.pyplot as plt > import numpy as np > > # Data for plotting > t = np.arange(0.0, 2.0, 0.01) > s = 1 + np.sin(2 * np.pi * t) > > fig, ax = plt.subplots() > ax.plot(t, s) > > ax.set(xlabel='time (s)', ylabel='voltage (mV)', > title='About as simple as it gets, folks') > ax.grid() > > fig.savefig("test.png") > plt.show() > > Best wishes, > > David > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/92ad4b45-be3d-2a35-8ba1-846f6aa072d7%40dbailey.co.uk. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6Ks537JPULKDN-BwaoaqJDAzuhxsjkEAzw%3DEcJBcGOY%3Dw%40mail.gmail.com.
