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