Nov-01-2020, 04:04 AM
My C++ project needs Python to do some simple things (I/O, batch string find/replacement...). I want my program self-contained and do not rely on the environment of the target computer for Python.
I have included Windows Python distribution in my project. My C++ project will use this included version of Python (to execute attached small python programs/files) no matter there is another Python installation on the PC or not. So my program can run on any target PCs that may have a different version of Python installed or may have no Python installed at all.
My program can also run on Linux. Now, I need to do the same thing for Linux to include Linux Python in my C++ program. I have downloaded and built/made the Python 3.8.6 source tarball. But I don't know which files/folders are the distribution I should copy to my project. Or is there any ready-to-go compressed file I can download somewhere?
Note:
What I want is to include a Python environment (its interpreter and main modules/packages) in my program. When I call "python aPythonFile" from my C++, the Python interpreter used is the one included inside my C++ program's distribution. I don't want to use the unknown version of the Python interpreter installed with the Linux system. I don't want to pack my python scripts with the Python interpreter as well because I may add more scripts later on.
What I want is a kind of portable Python environment/installation (for Linux ONLY) that can be distributed with my C++ program. It will be used by my C++ program to run/execute my small python programs/files.
I have included Windows Python distribution in my project. My C++ project will use this included version of Python (to execute attached small python programs/files) no matter there is another Python installation on the PC or not. So my program can run on any target PCs that may have a different version of Python installed or may have no Python installed at all.
My program can also run on Linux. Now, I need to do the same thing for Linux to include Linux Python in my C++ program. I have downloaded and built/made the Python 3.8.6 source tarball. But I don't know which files/folders are the distribution I should copy to my project. Or is there any ready-to-go compressed file I can download somewhere?
Note:
What I want is to include a Python environment (its interpreter and main modules/packages) in my program. When I call "python aPythonFile" from my C++, the Python interpreter used is the one included inside my C++ program's distribution. I don't want to use the unknown version of the Python interpreter installed with the Linux system. I don't want to pack my python scripts with the Python interpreter as well because I may add more scripts later on.
What I want is a kind of portable Python environment/installation (for Linux ONLY) that can be distributed with my C++ program. It will be used by my C++ program to run/execute my small python programs/files.