~ubuntu-branches/ubuntu/trusty/python-psutil/trusty-proposed

« back to all changes in this revision

Viewing changes to INSTALL

  • Committer: Package Import Robot
  • Author(s): Leo Iannacone
  • Date: 2012-01-07 13:18:54 UTC
  • mfrom: (2.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120107131854-6l22ulo9hwrroa8m
Tags: 0.4.1-1ubuntu1
* Merge with Debian unstable (LP: #913100).  Remaining Ubuntu changes:
  - Switch to dh_python2. (LP: #788514)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
==================
 
2
Using easy_install
 
3
==================
 
4
 
 
5
The easiest way to install psutil from sources is using easy_install.
 
6
Get the latest easy_install version from http://pypi.python.org/pypi/setuptools
 
7
and just run:
 
8
 
 
9
    easy_install psutil
 
10
 
 
11
This should get the most updated psutil version from the Python pypi repository,
 
12
unpack it, compile it and install it automatically.
 
13
 
 
14
 
 
15
===================================
 
16
Installing on Windows using mingw32
 
17
===================================
 
18
 
 
19
After the mingw [1] environment is properly set up on your system you can
 
20
compile Windows sources by entering:
 
21
 
 
22
    setup.py build -c mingw32
 
23
 
 
24
To compile and install just append the "install" keyword at the end of the
 
25
command line above, like this:
 
26
 
 
27
    setup.py build -c mingw32 install
 
28
 
 
29
It might be possible that distutils will complain about missing gcc executable.
 
30
That means you have to add mingw bin PATH variable first.
 
31
Entering this line in the command prompt should do the work:
 
32
 
 
33
    SET PATH=C:\MinGW\bin;%PATH%
 
34
 
 
35
NOTE: this assumes MinGW is installed in C:\MinGW, if not simply replace the
 
36
path in the command above with an appropriate location.
 
37
 
 
38
[1] http://www.mingw.org/
 
39
 
 
40
 
 
41
=========================================
 
42
Installing on Windows using Visual Studio
 
43
=========================================
 
44
 
 
45
To use Visual Studio to install psutil, you must have the same version of
 
46
Visual Studio used to compile your installation of Python. For older versions
 
47
of Python that will be Visual Studio 2003. For 2.6 and later it should be
 
48
Visual Studio 2008. If you do not have the requisite version of Visual Studio
 
49
available then it is recommended to use MinGW to compile psutil instead.
 
50
If you do have Visual Studio installed, you can use the basic distutils
 
51
commands:
 
52
 
 
53
     setup.py build
 
54
 
 
55
...or to install and build:
 
56
 
 
57
     setup.py install
 
58
 
 
59
distutils should take care of any necessary magic to compile from there.
 
60
 
 
61
 
 
62
==================
 
63
Installing on OS X
 
64
==================
 
65
 
 
66
OS X installation from source will require gcc which you can obtain as part of
 
67
the 'XcodeTools' installer from Apple. Then you can run the standard distutils
 
68
commands.
 
69
To build only:
 
70
 
 
71
     python setup.py build
 
72
 
 
73
To install and build:
 
74
 
 
75
     python setup.py install
 
76
 
 
77
NOTE: due to developer's hardware limitations psutil has only been compiled and
 
78
tested on OS X 10.4.11 so may or may not work on other versions.
 
79
 
 
80
 
 
81
=====================
 
82
Installing on FreeBSD
 
83
=====================
 
84
 
 
85
The same compiler used to install Python must be present on the system in order
 
86
to build modules using distutils. Assuming it is installed, you can build using
 
87
the standard distutils commands.
 
88
 
 
89
Build only:
 
90
 
 
91
     python setup.py build
 
92
 
 
93
Install and build:
 
94
 
 
95
     python setup.py install
 
96
 
 
97
 
 
98
===================
 
99
Installing on Linux
 
100
===================
 
101
 
 
102
gcc is required and so the python headers. They can easily be installed by using
 
103
the distro package manager. For example, on Ubuntu:
 
104
 
 
105
     sudo apt-get install python-dev
 
106
 
 
107
Once done, you can install/build psutil with:
 
108
 
 
109
     python setup.py install
 
110