Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. embed a python function into my Qt App.
Forum Updated to NodeBB v4.3 + New Features

embed a python function into my Qt App.

Scheduled Pinned Locked Moved Solved General and Desktop
32 Posts 4 Posters 6.8k Views
  • 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.
  • V Offline
    V Offline
    vinaygopal
    wrote on 26 Nov 2019, 06:58 last edited by
    #1

    When i click a button, i want to open up the python script (.py file) and run the python script written by me and exit python. I should be able to pass arguments to the python file through Qt c++? please help me out on how to achieve this. i did do some reading about QProcess class but i am not able to achieve this.

    J J J 3 Replies Last reply 26 Nov 2019, 07:15
    0
    • V vinaygopal
      28 Nov 2019, 10:47

      @JonB @jsulm @J-Hilk ok alright! i give up on embedding python into my program! it just doesn't seem to work however this is the reason for me to use Python, i have a file in my local desktop and i have to send it to the cloud and make the image uploaded a public image these cases can be easily achieved using python if i have to do it with javascript i will have to do it using node JS which will complicate the app, so from QProcess i am able to open the python file inside the python file i have a function called upload blob and it takes two arguments how do i call this function blob and pass those 2 arguments to them using QProcess().

      My C++ code

          QApplication a(argc, argv);
          qDebug()<<"working"<<endl;
          int result=QProcess::execute("C:/Users/vinay/AppData/Local/Programs/Python/Python38/python.exe",QStringList("C:/Users/vinay/Documents/first_qml_training/example_project/upload_to_cloud.py")<<"C:/Users/vinay/Documents/python folder/player1.png"<<"tank.png");
          qDebug()<<result<<endl;
      

      My python function

      #!/usr/bin/env python
      # -*- coding: utf-8 -*-
      from gcloud import storage
      import os
      os.environ["GOOGLE_APPLICATION_CREDENTIALS"]="C:/Users/vinay/Downloads/My First Example Project-507e91a5b594.json"
      
      def upload_blob(source_file_name, destination_blob_name):
          """Uploads a file to the bucket."""
          bucket_name="example_1995"
          storage_client = storage.Client()
          bucket = storage_client.get_bucket(bucket_name)
          blob = bucket.blob(destination_blob_name)
      
          blob.upload_from_filename(source_file_name)
      
          print('File {} uploaded to {}.'.format(
              source_file_name,
              destination_blob_name))
              
      print("i am working")
      

      "

      J Offline
      J Offline
      JonB
      wrote on 28 Nov 2019, 11:09 last edited by JonB
      #27

      @vinaygopal
      Which is why I asked as I did at the start! Really wish you had said!

      So you simply want to pass some string filenames to a script which does something, right? No need for integrated scripting.

      You need to tell us what actually happens/goes wrong!

      First just make your Python script print out everything in sys.argv so we can see.

      Oh, I see, you haven't twigged that at all. You can't just write a function in a standalone Python script/program. You need to have a main program in your script, and access argv for the command-line arguments!

      import sys
      # Main entry point of app
      if __name__ == "__main__":
          # args = sys.argv
          # count = len(sys.argv)
          while i < len(sys.argv):
              arg = sys.argv[i]
              print(arg)
      

      There are millions of examples on the web.

      Separately, you'd better hope all your commands etc are happy with those / path separators rather than native \. I don't want to debate this again with others: some Windows stuff is happy with /, some is not.

      V 1 Reply Last reply 28 Nov 2019, 12:29
      3
      • V vinaygopal
        26 Nov 2019, 06:58

        When i click a button, i want to open up the python script (.py file) and run the python script written by me and exit python. I should be able to pass arguments to the python file through Qt c++? please help me out on how to achieve this. i did do some reading about QProcess class but i am not able to achieve this.

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 26 Nov 2019, 07:15 last edited by
        #2

        @vinaygopal Take a look at https://docs.python.org/2/extending/embedding.html No need for QProcess I think.

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

        V 1 Reply Last reply 27 Nov 2019, 07:11
        5
        • V vinaygopal
          26 Nov 2019, 06:58

          When i click a button, i want to open up the python script (.py file) and run the python script written by me and exit python. I should be able to pass arguments to the python file through Qt c++? please help me out on how to achieve this. i did do some reading about QProcess class but i am not able to achieve this.

          J Offline
          J Offline
          JonB
          wrote on 26 Nov 2019, 08:48 last edited by JonB
          #3

          @vinaygopal
          You can indeed go down @jsulm's path, but embedding is a lot more involved than just running a subprocess. Which one you need depends on what this script is trying to do/what you want to achieve.

          If you want to pass arguments in/receive arguments back then in-process Python embedding may indeed be best. But as phrased if all you want to do is run an external script with some command-line arguments just like any other OS command but it happens to be written in Python, it really is simple to do with QProcess, should take one minute to write.

          i did do some reading about QProcess class but i am not able to achieve this.

          If you wish to pursue this route, what does this mean? Show some code, it's dead easy. For example, the simplest might be a one-liner using https://doc.qt.io/qt-5/qprocess.html#execute:

          int result = QProcess::execute("python", QStringList() << arg1 << arg2);
          
          
          1 Reply Last reply
          5
          • J jsulm
            26 Nov 2019, 07:15

            @vinaygopal Take a look at https://docs.python.org/2/extending/embedding.html No need for QProcess I think.

            V Offline
            V Offline
            vinaygopal
            wrote on 27 Nov 2019, 07:11 last edited by vinaygopal
            #4

            @jsulm i have to include the python library files in order to include Python.h can you please tell me how to specify lib path in QT in order for me to achieve this?

            i am following this tutorial (https://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code) now i can include the .h file but linking it with the library i am having some problems as i do not know how to specify the library path as per the tutorial or if you know anyother way this can be achieved please let me know.

            J 1 Reply Last reply 27 Nov 2019, 08:07
            0
            • V vinaygopal
              27 Nov 2019, 07:11

              @jsulm i have to include the python library files in order to include Python.h can you please tell me how to specify lib path in QT in order for me to achieve this?

              i am following this tutorial (https://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code) now i can include the .h file but linking it with the library i am having some problems as i do not know how to specify the library path as per the tutorial or if you know anyother way this can be achieved please let me know.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 27 Nov 2019, 08:07 last edited by
              #5

              @vinaygopal Please take a look at https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

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

              V 1 Reply Last reply 27 Nov 2019, 09:39
              2
              • J jsulm
                27 Nov 2019, 08:07

                @vinaygopal Please take a look at https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

                V Offline
                V Offline
                vinaygopal
                wrote on 27 Nov 2019, 09:39 last edited by
                #6

                @jsulm i have done the changes

                INCLUDEPATH +="C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include"
                
                wind32:LIBS += C:/Users/vinay/AppData/Local/Programs/Python/Python37-32/libs
                
                
                
                

                i have done the changes as per the document my include file works that is python.h is found but it is not able to link to the library as the path specified in the LIBS is a the directory to a bunch of libraries in python. i get this warning at the top of the screen

                "the code model could not parse an input file,which might lead to incorrect code completion"

                J 1 Reply Last reply 27 Nov 2019, 09:51
                0
                • V vinaygopal
                  27 Nov 2019, 09:39

                  @jsulm i have done the changes

                  INCLUDEPATH +="C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include"
                  
                  wind32:LIBS += C:/Users/vinay/AppData/Local/Programs/Python/Python37-32/libs
                  
                  
                  
                  

                  i have done the changes as per the document my include file works that is python.h is found but it is not able to link to the library as the path specified in the LIBS is a the directory to a bunch of libraries in python. i get this warning at the top of the screen

                  "the code model could not parse an input file,which might lead to incorrect code completion"

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 27 Nov 2019, 09:51 last edited by
                  #7

                  @vinaygopal said in embed a python function into my Qt App.:

                  "the code model could not parse an input file,which might lead to incorrect code completion"

                  You can ignore this.

                  Can you show the exact linker error?

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

                  V 2 Replies Last reply 27 Nov 2019, 09:56
                  1
                  • J jsulm
                    27 Nov 2019, 09:51

                    @vinaygopal said in embed a python function into my Qt App.:

                    "the code model could not parse an input file,which might lead to incorrect code completion"

                    You can ignore this.

                    Can you show the exact linker error?

                    V Offline
                    V Offline
                    vinaygopal
                    wrote on 27 Nov 2019, 09:56 last edited by
                    #8
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • J jsulm
                      27 Nov 2019, 09:51

                      @vinaygopal said in embed a python function into my Qt App.:

                      "the code model could not parse an input file,which might lead to incorrect code completion"

                      You can ignore this.

                      Can you show the exact linker error?

                      V Offline
                      V Offline
                      vinaygopal
                      wrote on 27 Nov 2019, 10:17 last edited by
                      #9

                      @jsulm these are the errors i get

                      this is my main fail

                      #include <QApplication>
                      #include <QDebug>
                      #include <Python.h>
                      
                      
                      
                      int main(int argc, char *argv[])
                      {
                          QApplication a(argc, argv);
                          qDebug()<<"working"<<endl;
                      
                      
                          return a.exec();
                      

                      these are the errors

                      C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include\pytime.h:6: In file included from ..\..\..\AppData\Local\Programs\Python\Python37-32\include/pytime.h:6:0,
                      
                      C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include\Python.h:87: from ..\..\..\AppData\Local\Programs\Python\Python37-32\include/Python.h:87,
                      
                      C:\Users\vinay\Documents\first_qml_training\example_project\main.cpp:6: from ..\example_project\main.cpp:6:
                      
                      C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include\object.h:448: error: expected unqualified-id before ';' token
                           PyType_Slot *slots; /* terminated by slot==0. */
                      
                                         ^
                      
                      J 1 Reply Last reply 27 Nov 2019, 11:37
                      0
                      • V vinaygopal
                        27 Nov 2019, 10:17

                        @jsulm these are the errors i get

                        this is my main fail

                        #include <QApplication>
                        #include <QDebug>
                        #include <Python.h>
                        
                        
                        
                        int main(int argc, char *argv[])
                        {
                            QApplication a(argc, argv);
                            qDebug()<<"working"<<endl;
                        
                        
                            return a.exec();
                        

                        these are the errors

                        C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include\pytime.h:6: In file included from ..\..\..\AppData\Local\Programs\Python\Python37-32\include/pytime.h:6:0,
                        
                        C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include\Python.h:87: from ..\..\..\AppData\Local\Programs\Python\Python37-32\include/Python.h:87,
                        
                        C:\Users\vinay\Documents\first_qml_training\example_project\main.cpp:6: from ..\example_project\main.cpp:6:
                        
                        C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include\object.h:448: error: expected unqualified-id before ';' token
                             PyType_Slot *slots; /* terminated by slot==0. */
                        
                                           ^
                        
                        J Offline
                        J Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 27 Nov 2019, 11:37 last edited by
                        #10

                        @vinaygopal This is not linker error but compiler.
                        Try to include the header like this:

                        extern "C"
                        {
                          #include <Python.h>
                        }
                        

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

                        V 1 Reply Last reply 27 Nov 2019, 11:56
                        1
                        • J jsulm
                          27 Nov 2019, 11:37

                          @vinaygopal This is not linker error but compiler.
                          Try to include the header like this:

                          extern "C"
                          {
                            #include <Python.h>
                          }
                          
                          V Offline
                          V Offline
                          vinaygopal
                          wrote on 27 Nov 2019, 11:56 last edited by
                          #11

                          @jsulm I tried it and i got the same set of errors however when i tried with the right click and add library method i get this following error

                          :-1: error: No rule to make target 'C:/Users/vinay/Documents/first_qml_training/example_project/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37d.a', needed by 'debug/example_project.exe'.  Stop.
                          
                          J 1 Reply Last reply 27 Nov 2019, 12:15
                          0
                          • V vinaygopal
                            27 Nov 2019, 11:56

                            @jsulm I tried it and i got the same set of errors however when i tried with the right click and add library method i get this following error

                            :-1: error: No rule to make target 'C:/Users/vinay/Documents/first_qml_training/example_project/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37d.a', needed by 'debug/example_project.exe'.  Stop.
                            
                            J Offline
                            J Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on 27 Nov 2019, 12:15 last edited by
                            #12

                            @vinaygopal Can you show your pro file?

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

                            V 1 Reply Last reply 27 Nov 2019, 12:29
                            1
                            • J jsulm
                              27 Nov 2019, 12:15

                              @vinaygopal Can you show your pro file?

                              V Offline
                              V Offline
                              vinaygopal
                              wrote on 27 Nov 2019, 12:29 last edited by
                              #13

                              @jsulm

                              QT       += core gui networkauth
                              
                              greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                              
                              TARGET = example_project
                              TEMPLATE = app
                              
                              
                              # The following define makes your compiler emit warnings if you use
                              # any feature of Qt which has been marked as deprecated (the exact warnings
                              # depend on your compiler). Please consult the documentation of the
                              # deprecated API in order to know how to port your code away from it.
                              DEFINES += QT_DEPRECATED_WARNINGS
                              
                              # You can also make your code fail to compile if you use deprecated APIs.
                              # In order to do so, uncomment the following line.
                              # You can also select to disable deprecated APIs only up to a certain version of Qt.
                              #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                              
                              CONFIG += c++11
                              
                              SOURCES += \
                                      main.cpp \
                                      google_widget.cpp
                              
                              HEADERS += \
                                      google_widget.h
                              
                              FORMS += \
                                      google_widget.ui
                              
                              # Default rules for deployment.
                              qnx: target.path = /tmp/$${TARGET}/bin
                              else: unix:!android: target.path = /opt/$${TARGET}/bin
                              !isEmpty(target.path): INSTALLS += target
                              
                              DISTFILES += \
                                  upload_to_cloud.py
                              
                              
                              #CONFIG += no_lflags_merge
                              
                              INCLUDEPATH +="C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include"
                              
                              
                              
                              win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/ -lpython37
                              else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/ -lpython37d
                              else:unix: LIBS += -L$$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/ -lpython37
                              
                              
                              win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37.a
                              else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37d.a
                              else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/python37.lib
                              else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/python37d.lib
                              else:unix: PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37.a
                              
                              
                              J 1 Reply Last reply 27 Nov 2019, 12:36
                              0
                              • V vinaygopal
                                27 Nov 2019, 12:29

                                @jsulm

                                QT       += core gui networkauth
                                
                                greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                                
                                TARGET = example_project
                                TEMPLATE = app
                                
                                
                                # The following define makes your compiler emit warnings if you use
                                # any feature of Qt which has been marked as deprecated (the exact warnings
                                # depend on your compiler). Please consult the documentation of the
                                # deprecated API in order to know how to port your code away from it.
                                DEFINES += QT_DEPRECATED_WARNINGS
                                
                                # You can also make your code fail to compile if you use deprecated APIs.
                                # In order to do so, uncomment the following line.
                                # You can also select to disable deprecated APIs only up to a certain version of Qt.
                                #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                                
                                CONFIG += c++11
                                
                                SOURCES += \
                                        main.cpp \
                                        google_widget.cpp
                                
                                HEADERS += \
                                        google_widget.h
                                
                                FORMS += \
                                        google_widget.ui
                                
                                # Default rules for deployment.
                                qnx: target.path = /tmp/$${TARGET}/bin
                                else: unix:!android: target.path = /opt/$${TARGET}/bin
                                !isEmpty(target.path): INSTALLS += target
                                
                                DISTFILES += \
                                    upload_to_cloud.py
                                
                                
                                #CONFIG += no_lflags_merge
                                
                                INCLUDEPATH +="C:\Users\vinay\AppData\Local\Programs\Python\Python37-32\include"
                                
                                
                                
                                win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/ -lpython37
                                else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/ -lpython37d
                                else:unix: LIBS += -L$$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/ -lpython37
                                
                                
                                win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37.a
                                else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37d.a
                                else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/python37.lib
                                else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/python37d.lib
                                else:unix: PRE_TARGETDEPS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/libpython37.a
                                
                                
                                J Offline
                                J Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on 27 Nov 2019, 12:36 last edited by
                                #14

                                @vinaygopal On Windows it should be:

                                LIBS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/python37.lib
                                

                                See https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

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

                                V 1 Reply Last reply 28 Nov 2019, 06:51
                                2
                                • J jsulm
                                  27 Nov 2019, 12:36

                                  @vinaygopal On Windows it should be:

                                  LIBS += $$PWD/../../../AppData/Local/Programs/Python/Python37-32/libs/python37.lib
                                  

                                  See https://doc.qt.io/qt-5/qmake-variable-reference.html#libs

                                  V Offline
                                  V Offline
                                  vinaygopal
                                  wrote on 28 Nov 2019, 06:51 last edited by
                                  #15

                                  @jsulm i did add the library as you had recomended it still did'nt work and more importantly i figured the module python.h and its equivalent library is not compatible with mingw gcc compiler it is only compatible with microsoft specific compilers as suggested by this question (https://stackoverflow.com/questions/6731100/link-to-python-with-mingw) they have provided an answer but is there a simpler way to get this done?

                                  J 1 Reply Last reply 28 Nov 2019, 07:03
                                  0
                                  • V vinaygopal
                                    28 Nov 2019, 06:51

                                    @jsulm i did add the library as you had recomended it still did'nt work and more importantly i figured the module python.h and its equivalent library is not compatible with mingw gcc compiler it is only compatible with microsoft specific compilers as suggested by this question (https://stackoverflow.com/questions/6731100/link-to-python-with-mingw) they have provided an answer but is there a simpler way to get this done?

                                    J Offline
                                    J Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on 28 Nov 2019, 07:03 last edited by
                                    #16

                                    @vinaygopal One question: do you build your app as 64bit? Your Python seems to be 32bit.

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

                                    V 1 Reply Last reply 28 Nov 2019, 07:18
                                    0
                                    • J jsulm
                                      28 Nov 2019, 07:03

                                      @vinaygopal One question: do you build your app as 64bit? Your Python seems to be 32bit.

                                      V Offline
                                      V Offline
                                      vinaygopal
                                      wrote on 28 Nov 2019, 07:18 last edited by
                                      #17

                                      @jsulm i am building my apps in the 64 bit configuration. shoudl i change it to 32 bit and try building the program again?

                                      J 1 Reply Last reply 28 Nov 2019, 07:30
                                      0
                                      • V vinaygopal
                                        28 Nov 2019, 07:18

                                        @jsulm i am building my apps in the 64 bit configuration. shoudl i change it to 32 bit and try building the program again?

                                        J Offline
                                        J Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on 28 Nov 2019, 07:30 last edited by
                                        #18

                                        @vinaygopal said in embed a python function into my Qt App.:

                                        shoudl i change it to 32 bit

                                        Yes, you can't mix 32bit and 64bit

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

                                        V 1 Reply Last reply 28 Nov 2019, 09:22
                                        0
                                        • J jsulm
                                          28 Nov 2019, 07:30

                                          @vinaygopal said in embed a python function into my Qt App.:

                                          shoudl i change it to 32 bit

                                          Yes, you can't mix 32bit and 64bit

                                          V Offline
                                          V Offline
                                          vinaygopal
                                          wrote on 28 Nov 2019, 09:22 last edited by
                                          #19

                                          @jsulm uninstalled python 32 bit and reinstalled 64bit version of python and included the libraries still the same error

                                          :-1: error: No rule to make target 'C:/Users/vinay/Documents/first_qml_training/example_project/../../../AppData/Local/Programs/Python/Python38/libs/libpython38d.a', needed by 'debug/example_project.exe'. Stop.

                                          J 1 Reply Last reply 28 Nov 2019, 09:25
                                          0
                                          • V vinaygopal
                                            28 Nov 2019, 09:22

                                            @jsulm uninstalled python 32 bit and reinstalled 64bit version of python and included the libraries still the same error

                                            :-1: error: No rule to make target 'C:/Users/vinay/Documents/first_qml_training/example_project/../../../AppData/Local/Programs/Python/Python38/libs/libpython38d.a', needed by 'debug/example_project.exe'. Stop.

                                            J Offline
                                            J Offline
                                            jsulm
                                            Lifetime Qt Champion
                                            wrote on 28 Nov 2019, 09:25 last edited by
                                            #20

                                            @vinaygopal Can you show your current pro file?
                                            Also did you a clean rebuild?

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

                                            V 1 Reply Last reply 28 Nov 2019, 09:47
                                            0

                                            1/32

                                            26 Nov 2019, 06:58

                                            • Login

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