[Tutor] Does the user need to install Python, when we deploy our c++ products using python?
alan.gauld at btinternet.com
Wed Dec 3 12:29:32 CET 2014
On 02/12/14 20:28, gordon zhang wrote:
> I downloaded python 3.4.2 for c++ and create a vc++ project using
> python, but I have no idea what python dlls and other stuff needed to
> deploy the products.
Python is an interpreter so you will need the full Python interpreter
and all the module files that you use. Some of these are DLLs others are
> I know if we put Python34.dll and Python.dll in the folder of
> executable, it is not enough. What else do we need to put in the folder
> of executable?(the application does not run)
Using Python just to build an installer script where the users don't
already have Python installed sounds like a bad idea to me. Especially
on Windows(which given the mention of VC++ seems to be the platform).
There are plenty of installer tools for Windows that would be more
suitable and some of them are even free.
If Python was already installed on your target PCs it would be a
reasonable decision but, if not, you effectively need two installers -
one for Python and another for your app.
There are tools such as freeze or py2exe that can bundle up a Python
script as a single exe file but that means installing the interpreter as
part of the exe. You could of course delete the python exe bundle after
the install completed but it still seems overkill for an install script.
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:
More information about the Tutor