Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Package python along with my C++ app
Qt 6.11 is out! See what's new in the release blog

Package python along with my C++ app

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 4 Posters 899 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Please_Help_me_DP Offline
    Please_Help_me_DP Offline
    Please_Help_me_D
    wrote on last edited by
    #1

    Hi,

    For now it is just a theoretical question.

    I have a Qt application that links to external libraries built on Ubuntu 20.04
    To create an installator I use linuxdeployqt.
    What I want is to add python with all its directories to the installation process. And for example python is not linked anyhow to my application, I just want it to be unpacked along with my application (for example I'm going to use it as a subprocess without linking).

    Is there a way to add python to my application installation? More generally: can I add external files that are not linked and are not in Qt resource file to the installator of my application?

    jsulmJ JonBJ 2 Replies Last reply
    0
    • Please_Help_me_DP Please_Help_me_D

      Hi,

      For now it is just a theoretical question.

      I have a Qt application that links to external libraries built on Ubuntu 20.04
      To create an installator I use linuxdeployqt.
      What I want is to add python with all its directories to the installation process. And for example python is not linked anyhow to my application, I just want it to be unpacked along with my application (for example I'm going to use it as a subprocess without linking).

      Is there a way to add python to my application installation? More generally: can I add external files that are not linked and are not in Qt resource file to the installator of my application?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Please_Help_me_D Sure, you can add whatever you want to the package containing your application. You can also use some proper installer framework like https://doc.qt.io/qtinstallerframework/index.html to create a real installer for your application.

      Usually Python needs to be properly installed. But it should be possible to package Python as part of your app, see https://www.pythonforengineers.com/3-and-12-ways-to-try-python-without-installing-it/

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • Please_Help_me_DP Please_Help_me_D

        Hi,

        For now it is just a theoretical question.

        I have a Qt application that links to external libraries built on Ubuntu 20.04
        To create an installator I use linuxdeployqt.
        What I want is to add python with all its directories to the installation process. And for example python is not linked anyhow to my application, I just want it to be unpacked along with my application (for example I'm going to use it as a subprocess without linking).

        Is there a way to add python to my application installation? More generally: can I add external files that are not linked and are not in Qt resource file to the installator of my application?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Please_Help_me_D
        I will just say: under Linux I would expect/prefer you not to provide a Python distro, Ubuntu etc come with Python installed in system area. I know there are debates about whether your application might be better with a "virtual environment" where you control the precise Python version or packages it comes with, but there are pros & cons, e..g. system-wide Python is kept up-to-date with patches etc. Food for thought.

        1 Reply Last reply
        2
        • Please_Help_me_DP Offline
          Please_Help_me_DP Offline
          Please_Help_me_D
          wrote on last edited by
          #4

          Thank you for information!

          Just a quick question: does Qt Installer Framework work with QMake projects or it can also work with CMake projects?

          Ronel_qtmasterR 1 Reply Last reply
          0
          • Please_Help_me_DP Please_Help_me_D has marked this topic as solved on
          • Please_Help_me_DP Please_Help_me_D

            Thank you for information!

            Just a quick question: does Qt Installer Framework work with QMake projects or it can also work with CMake projects?

            Ronel_qtmasterR Offline
            Ronel_qtmasterR Offline
            Ronel_qtmaster
            wrote on last edited by
            #5

            @Please_Help_me_D Both

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved