summaryrefslogtreecommitdiff
path: root/INSTALL.rst
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-11-18 03:09:58 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2017-11-18 03:09:58 +0100
commita7e7b4e83f66576f507ca5fa2759f092cffc18b7 (patch)
tree436a0233253598dd9d6c4cc01f3d5f0a325ce78a /INSTALL.rst
parentca3eb35e8b5b76f8c8f0230071e08ecf86d83486 (diff)
downloadpsutil-a7e7b4e83f66576f507ca5fa2759f092cffc18b7.tar.gz
syntax highlight in doc files
Diffstat (limited to 'INSTALL.rst')
-rw-r--r--INSTALL.rst55
1 files changed, 37 insertions, 18 deletions
diff --git a/INSTALL.rst b/INSTALL.rst
index 8737c94a..4cd9bc9e 100644
--- a/INSTALL.rst
+++ b/INSTALL.rst
@@ -4,16 +4,22 @@ Install pip
pip is the easiest way to install psutil.
It is shipped by default with Python 2.7.9+ and 3.4+. For other Python versions
you can install it manually.
-On Linux or via wget::
+On Linux or via wget:
+
+.. code-block:: bash
wget https://bootstrap.pypa.io/get-pip.py -O - | python
-On OSX or via curl::
+On OSX or via curl:
+
+.. code-block:: bash
python < <(curl -s https://bootstrap.pypa.io/get-pip.py)
On Windows, `download pip <https://pip.pypa.io/en/latest/installing/>`__, open
-cmd.exe and install it::
+cmd.exe and install it:
+
+.. code-block:: bat
C:\Python27\python.exe get-pip.py
@@ -25,25 +31,30 @@ If you're not or you bump into permission errors you can either:
* prepend ``sudo``, e.g.:
-::
+.. code-block:: bash
sudo pip install psutil
* install psutil for your user only (not at system level):
-::
+.. code-block:: bash
pip install --user psutil
Linux
=====
-Ubuntu / Debian::
+Ubuntu / Debian:
+
+.. code-block:: bash
sudo apt-get install gcc python-dev python-pip
pip install psutil
-RedHat / CentOS::
+RedHat / CentOS:
+
+
+.. code-block:: bash
sudo yum install gcc python-devel python-pip
pip install psutil
@@ -51,11 +62,15 @@ RedHat / CentOS::
If you're on Python 3 use ``python3-dev`` and ``python3-pip`` instead.
Major Linux distros also provide binary distributions of psutil so, for
-instance, on Ubuntu and Debian you can also do::
+instance, on Ubuntu and Debian you can also do:
+
+.. code-block:: bash
sudo apt-get install python-psutil
-On RedHat and CentOS::
+On RedHat and CentOS:
+
+.. code-block:: bash
sudo yum install python-psutil
@@ -68,7 +83,7 @@ OSX
Install `Xcode <https://developer.apple.com/downloads/?name=Xcode>`__
first, then:
-::
+.. code-block:: bash
pip install psutil
@@ -77,7 +92,9 @@ Windows
The easiest way to install psutil on Windows is to just use the pre-compiled
exe/wheel installers hosted on
-`PYPI <https://pypi.python.org/pypi/psutil/#downloads>`__ via pip::
+`PYPI <https://pypi.python.org/pypi/psutil/#downloads>`__ via pip:
+
+.. code-block:: bat
C:\Python27\python.exe -m pip install psutil
@@ -92,7 +109,9 @@ Compiling 64 bit versions of Python 2.6 and 2.7 with VS 2008 requires
`Windows SDK and .NET Framework 3.5 SP1 <https://www.microsoft.com/en-us/download/details.aspx?id=3138>`__.
Once installed run vcvars64.bat, then you can finally compile (see
`here <http://stackoverflow.com/questions/11072521/>`__).
-To compile / install psutil from sources on Windows run::
+To compile / install psutil from sources on Windows run:
+
+.. code-block:: bat
make.bat build
make.bat install
@@ -100,7 +119,7 @@ To compile / install psutil from sources on Windows run::
FreeBSD
=======
-::
+.. code-block:: bash
pkg install python gcc
python -m pip install psutil
@@ -108,7 +127,7 @@ FreeBSD
OpenBSD
=======
-::
+.. code-block:: bash
export PKG_PATH="http://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`arch -s`/"
pkg_add -v python gcc
@@ -117,7 +136,7 @@ OpenBSD
NetBSD
======
-::
+.. code-block:: bash
export PKG_PATH="ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
pkg_add -v pkgin
@@ -129,13 +148,13 @@ Solaris
If ``cc`` compiler is not installed create a symlink to ``gcc``:
-::
+.. code-block:: bash
sudo ln -s /usr/bin/gcc /usr/local/bin/cc
Install:
-::
+.. code-block:: bash
pkg install gcc
python -m pip install psutil
@@ -143,7 +162,7 @@ Install:
Install from sources
====================
-::
+.. code-block:: bash
git clone https://github.com/giampaolo/psutil.git
cd psutil