Johnny Chen | b7cfba4 | 2011-03-11 20:13:06 +0000 | [diff] [blame] | 1 | Installation |
| 2 | ------------ |
| 3 | This is a standard Python Distutil distribution. To install simply run: |
| 4 | |
| 5 | python setup.py install |
| 6 | |
| 7 | This makes Pexpect available to any script on the machine. You need |
| 8 | root access to install it this way. If you do not have root access or |
| 9 | if you do not wish to install Pexpect so that is available to any script |
| 10 | then you can just copy the pexpect.py file to same directory as your script. |
| 11 | |
| 12 | Trouble on Debian and Ubuntu |
| 13 | ---------------------------- |
| 14 | For some stupid reason Debian Linux does not include the distutils module |
| 15 | in the standard 'python' package. Instead, the distutils module is packaged |
| 16 | separately in the 'python-dev' package. So to add distutils back |
| 17 | into Python, simply use aptitude or apt-get to install 'python-dev'. |
| 18 | As root, run this command: |
| 19 | apt-get install python-dev |
| 20 | Why they do this is mysterious because: |
| 21 | - It breaks the Python model of "batteries included". |
| 22 | 'distutils' isn't an extra or optional module -- |
| 23 | it's parts of the Standard Python Library. |
| 24 | - The Debian 'python-dev' package is a microscopic 50K installed. |
| 25 | So what are they saving? |
| 26 | - Distutils is not only interesting to developers. Many non-development |
| 27 | oriented Python packages use 'distutils' to install applications. |
| 28 | - As far as I can tell, the package maintainers must go through |
| 29 | more trouble to remove 'distutils' from the standard Python |
| 30 | distribution than it would take just to leave it in. |
| 31 | |