Ubuntu provides the documentation for Python and its major libraries as different packages. The documentation is in HTML format and can be viewed in your browser once installed.
These documents are installed as a sub-directory in
/usr/share/doc/. After installing the packages, we may browse to this folder and open the
index.html file contained therein with our Browser and bookmark its location for easy access.
It's good to search Ubuntu Software Center for the package of the documentation you want. Use the keywords as:
python-<library_name>-doc for documentation relating to Python 2 third-party library; and
python3-<library_name>-doc for documentation relating to Python 3 third-party library.
You should be able to find them with some trial and error, otherwise Google is your friend.
Example for installing Python documentation and PyQt4 Reference Guide
Following is an example relating to:
Install the documentation package
sudo apt-get update
sudo apt-get install python-doc python-qt4-doc
Add as Browser bookmark
Open your File Manager and browse to
/usr/share/doc/python-doc and look for
index.html file to open it with your browser. Then add it as a bookmark.
Similarly, browse to
/usr/share/doc/python-qt4-doc/html and look for
index.html and add that as a bookmark. I would also suggest to bookmark the location of
/usr/share/doc/python-qt4-doc/examples for some good example code written in PyQt4.
You may follow similar approach for having access to offline documentation for other third-party Python libraries.