By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,908 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,908 IT Pros & Developers. It's quick & easy.

packaging python for install.

P: n/a
J
Hi everyone,

I have created an App that embedds the python interpreter and I am
now in the process of creating an installer. I am currently linking
python24.lib, but it is only 184k and I suspect that it imports other
dlls... I am also using numarray. Does anyone have any experiences in
packaging python with an application in a single installer ? Has that
been done before ?
Cheers

Sep 11 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
J wrote:
I have created an App that embedds the python interpreter and I am
now in the process of creating an installer. I am currently linking
python24.lib, but it is only 184k and I suspect that it imports other
dlls... I am also using numarray. Does anyone have any experiences in
packaging python with an application in a single installer ? Has that
been done before ?


- you need python24.dll (probably in %windir%\system32)
- you need some of the *.pyd found in you Pythondir\DLLs. You can use
Proces Explorer from www.sysinternals.com to see all the loaded DLLs and
..pyd that your running program accesses
- you need a large part of the Python library. Best: compile them to
..pyc files using Pythondir\Lib\compileall.py, pack them into one .zip
file and then add that .zip file to %PYTHONPATH%

Hint: Python will search for the Library files through the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\PythonCore\<version>. You don't have to set
this entry with your installer (and you shouldn't, as it would break an
already existing Python installation). But you could rename it on your
machine as this allows you to test your installation without having to
copy everything to a clean machine.

Daniel
Sep 12 '05 #2

P: n/a
Hello J,
I have created an App that embedds the python interpreter and I am
now in the process of creating an installer. I am currently linking
python24.lib, but it is only 184k and I suspect that it imports other
dlls... I am also using numarray. Does anyone have any experiences in
packaging python with an application in a single installer ? Has that
been done before ?


http://starship.python.net/crew/thel...ippingEmbedded

HTH,
Miki

Sep 12 '05 #3

P: n/a
J
Hi Miki

Thx for you reply. I have tried the procedure but I am stuck with

python setup.py py2exe --includes mymodule.

I get the following error: "ImportError: No module named mymodule"

I don't know what mymodule should contain. Basically I want all of
python and numarray
to be part of the distribution. The script creates a directory called
dist, but that's about it...

Am I right to assume that mymodule just contains an bunch of import
statements ?
Cheers
Jochen

Sep 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.