How can 开发者_如何学运维I know if the environment that I am in (some version of HPUX) has python installed?
If python is in your PATH-Environment variable (if it is properly installed, it should be), you could use one of the following three:
python --version
which python
Whereis python
- Calls python --version
- Shows the path that is called when using
python
- Shows all paths to python
If you are unlucky, it is not in your PATH and you actually have to search the whole system to be sure it is not installed somewhere.
find / -name python
you can use the swinstall command to list installed packages: http://www.bga.org/~lessem/psyc5112/usail/man/hpux/swinstall.1.html
and as @jacob said the which
,whereis
and find
commands are very usefull
精彩评论