Avatar of MichaelBalack
MichaelBalack
Flag for Singapore asked on

How to setup matplotlib in linux server?

This is referring to the smem of url > https://www.selenic.com/smem/. We have already downloaded the smem (.tar.gz), and unzip them in /root/smem-1.4. smem is working now. However, if you want have the figures in pie chart(as shown in the url), you need to setup "matplotlab".

We already downloaded the matplotlib-3.0.0.tar.gz, and unzip to /root/matplotlib-3.0.0 folder. Please see the list of files as below,

INSTALL.rst
LICENSE
MANIFEST.in
PKG-INFO
README.rst
doc
examples
extern
lib
matplotlibrc.template
pytest.ini
setup.cfg.template
setup.py
setupext.py
src

BTW, how to setup this matplotlib on the server?

Thanks in advance.
tests.py
tools
tutorials
versioneer.py
LinuxSoftware

Avatar of undefined
Last Comment
MichaelBalack

8/22/2022 - Mon
MichaelBalack

ASKER
Hi all,

lib, tools, doc, examples, src, tutorials, LICENSE, and extern are folders
myousufali

On Redhat Linux you can run below command

# yum -y install python-matplotlib

Check Python, NumPy, libpng and FreeType dependencies are installed before hand.

https://matplotlib.org/users/installing.html
David Favor

If you're using Ubuntu/Debian, you can simply do this...

apt-get install smem

Open in new window


Which will install smem + all dependencies.
Your help has saved me hundreds of hours of internet surfing.
fblack61
noci

if pip is supported on your platform you could try pip install python-matplotlib
See also:
https://pythonspot.com/matplotlib/
dfke

Hi,

alternatively you can install Matplotlib and its dependencies as wheel packages

python -m pip install -U pip
python -m pip install -U matplotlib

Open in new window


Cheers
MichaelBalack

ASKER
Hi Myousufali and David,

This is using SuSE Linux Enterprise 11 with SP4.

Hi noci,

Think pip is not support.

Hi dfke,

Attempt to run any one of the commands suggested result in error,

/usr/bin/python: No module named pip
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
MichaelBalack

ASKER
Hi all,

Python version is, 2.6.9-31.1
dfke

Hi,

you need to install pip first then:

curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
zypper install python-setuptools
python setup.py install
ln -sfn /usr/local/bin/pip /usr/bin/pip
pip install --upgrade awscli
cd ..

Open in new window

Cheers
David Favor

While dkfe's suggestion is correct, about how to install pip, better to install pip + all packages via the package manager.

This allows you to do simple upgrades, via the package manager, to pull in bug fixes + security fixes + performance enhancements.

Remember, anything you build from source, you must continually monitor each project you build + rebuild it anytime the code becomes hackable.

So, since your using SUSE, you'll use SUSE Zypper to install all your packages. I only use Ubuntu, so I'm unfamiliar with exact syntax, so refer to link.

And likely Zypper provides dependency management, so when you install one package, then any dependencies like pip, are installed for you.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
noci

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
MichaelBalack

ASKER
Found expert - noci's suggestion is good.