sys.path.append(r"C:\path\to\paramiko")

From: Daniel Casper [mailto:dancasper@gmail.com]
Sent: Monday, January 20, 2014 11:29 AM
To: John Nevius
Cc: py2exe-users@lists.sourceforge.net

You might try adding setup options like so:

options = {
"py2exe": {
"packages": ['paramiko']
}
}

setup(console=['test2.py'], options=options)

I haven't worked with paramiko directly, but that's the standard approach to forcing a library to be included in a py2exe executable.

On Mon, Jan 20, 2014 at 11:54 AM, John Nevius <john.nevius@johnneviusconsulting.com> wrote:

Apologies to all if this has been covered previously.  I did search the archives and could not find a similar question.

Environment Windows 7 / Python 2.7

Running py2exe on my target application generates the message:

The following modules appear to be missing

['paramiko']

A test program that reproduces the problem:


# Test file for py2exe
 
import sys
import os
import paramiko
 
print "This is a test"

The setup module:


#
from distutils.core import setup
import py2exe
setup(console=['test2.py'])
 
 
 

Paramiko was installed via the Windows installer and
does not reside in the /lib/site-packages directory.

Of course the target program operates properly when
invoked 'normally'.

------------------------------------------------------------------------------