How to install a Python package with documentation?

rogepa

I'm tryin' to find a way to install a python package with its docs. I have to use this on machines that have no connection to the internet and so online help is not a solution to me. Similar questions already posted here are telling that this is not possible. Do you see any way to make this easier as I'm currently doing this:

  1. downloading the source archive
  2. extracting the docs folder
  3. running sphinx
  4. launching the index file from a browser (firefox et al.)

Any ideas?

P.S. I'm very new to Python, so may be I'm missing something... And I'm using Windows (virtual) machines...

Edit:

I'm talking about two possible ways to install a package:

  1. installing the package via easy_install (or any other to me unknown way) on a machine while I'm online, and then copying the changes to my installation to the target machine
  2. downloading the source package (containing sphinx compatible docs) and installing the package on the target machine off-line

But in any case I do not know a way to install the package in a way that the supplied documentations are installed alltogether with module!

You might know that there exists a folder for the docs: <python-folder>/Doc which will contain only python278.chm after installation of Python 2.78 on Windows. So, I expect that this folder will also contain the docs for a newly installed package. This will avoid looking at docs for a different package version on the internet as well as my specific machine setup problems.

Most packages I'm currently using are supplied with documentation generated with sphinx, and their source package contains all the files necessary to generate the docs offline.

So what I'm looking for is some cli argument for a package installer like it's common for unix/linux based package managers. I did expect something like: easy_install a_package --with-html-docs.

Steve Barnes

Here are some scenarios:

  1. packages have documentation included within the zip/tar
  2. packages have a -docs to download/install seperately
  3. packages that have buildable documentation
  4. packages that only have online documentation
  5. packages with no documentation other than internal.
  6. packages with no documentation anywhere.

The sneaky trick that you can use for options 1 & 3 is to download the package as a tar or zip and then use easy-install archive_name on the target machine this will install the package from the zip or tar file including (I believe) any documentation. You will find that there are dependencies that are unmet in some packages - those should give an error on the easy install mentioning what is missing - you will need to get those and use the same trick.

A couple of things that are very handy - virtual-env will let you have a library free version of python running so you can get the requirements and pip -d <dir> which will download without installing storing your packages in dir.

You should be able to use the same trick for option 2.

With packages that only have on-line documentation you could look to see if there is a downloadable version or could scrape the web pages and use a tool like pandoc to convert to something useful.

In the 5 scenario I would suggest raising a ticket on the package stating that lack of accessible documentation makes it virtually unusable and running sphinx on it.

In scenario 6 I suggest raising the ticket but missing out virtually and avoiding the use of that package on the basis that if it has no documentation it probably has a lot of other problems as well - if you are a package author feeling slandered reading this then you should be feeling ashamed instead.

Mirror/Cache PyPi

Another possibly is to have a linux box, or VM, initially outside of your firewall, running a cached or mirroring service e.g. pipyserver, install the required packages through it to populate the cache and then move it, (or its cache to another pip server), inside the firewall and you can then use pip with the documented settings to do all your installs inside the firewall. See also the answer here.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Installing Python package documentation

From Dev

How to install the fitsio package in python

From Dev

how to install bottle package in python?

From Dev

How to 'partially' install a Python package

From Dev

how to install wordcloud package in python?

From Java

How do I install the yaml package for Python?

From Dev

How to install xgboost package in python (windows platform)?

From Dev

How do I install this python package?

From Dev

How to install Python package pyzmq properly?

From Dev

how to install Lasagne package with python con windows

From Dev

How to install the `twitter` python package from PyPI?

From Dev

How to install packages without documentation?

From Dev

Install Python package locally

From Dev

Unable to Install Python Package

From Dev

How to install pip and a python package for self installed python?

From Dev

How to install pip and a python package for self installed python?

From Dev

How to read Python Documentation

From Dev

How to read Python Documentation

From Dev

How to install a MyGet package?

From Dev

How to install package in anaconda?

From Dev

How to remove package that is not install?

From Dev

How to install this package?

From Dev

How to install a package offline

From Dev

How to install package in R

From Java

How to build API documentation for an R package in RStudio?

From Dev

How to find package, version, documentation for a Haskell name

From Dev

How to create documentation with devtools while building a package?

From Dev

How to install Python bindings originating from an apt package?

From Java

How to install python3 version of package via pip on Ubuntu?

Related Related

HotTag

Archive