How to install Python modules needed by plugins?

Eli Zaretskii eliz at gnu.org
Wed Mar 9 06:08:09 UTC 2011


> From: John Arbash Meinel <john at arbash-meinel.com>
> Date: Tue, 08 Mar 2011 20:22:34 +0100
> 
> I don't know the exact details offhand. But there is a directory created
> by the installer that is on the search path. Installing modules into
> that directory will let them be found at runtime.

Thanks.

The bzr installer adds "C:\Program Files\Bazaar" to Path.  I tried to
copy the fastimport/ directory from python-fastimport to that
directory, to its lib/ subdirectory, and to plugins/fastimport.  All
of these attempts failed.  In some cases, I got this error message:

  bzr: ERROR: Unable to import library "fastimport": bzr-fastimport requires the fasimport python module

Somewhat strangely, this error can be shut up by installing
python-fastimport into a fastimport/ subdirectory of
plugins/fastimport (i.e. by recursively copying
python-fastimport/fastimport/* to plugins/fastimport/fastimport).  But
then another error appears:

  bzr: ERROR: No module named fastimport
  You may need to install this Python library separately.

Finally, I tried to add python-fastimport to lib/library.zip:

  cd python-fastimport
  zip -r "C:\Program Files\Bazaar\lib\library.zip" fastimport

And that worked!  So the conclusion of this seems to be:

  To install an extra Python module on Windows for bzr installed with
  a stand-alone installer, add the Python module's main directory,
  with all the files in it, to library.zip.

(Children, don't try that at home without backing up the original
library.zip first!)

Thanks a lot to everyone in this thread for your help and patience.  I
now have a working bzr-fastimport.



More information about the bazaar mailing list