Link to home
Start Free TrialLog in
Avatar of MichaelBalack
MichaelBalackFlag 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
Avatar of MichaelBalack
MichaelBalack
Flag of Singapore image

ASKER

Hi all,

lib, tools, doc, examples, src, tutorials, LICENSE, and extern are folders
Avatar of myousufali
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
Avatar of 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.
if pip is supported on your platform you could try pip install python-matplotlib
See also:
https://pythonspot.com/matplotlib/
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
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
Hi all,

Python version is, 2.6.9-31.1
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
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.
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found expert - noci's suggestion is good.