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. Problem with python.h
Forum Updated to NodeBB v4.3 + New Features

Problem with python.h

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 1.6k 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.
  • J Offline
    J Offline
    Jonh78
    wrote on last edited by
    #1

    Hi everyone
    I am new to QT creator and in compiling a program I am notified of the error python.h no such file or directory. I have QtCreator installed on Ubuntu in Virtual Machine and I also have 1.62 boost and Python 2.7 installed correctly. the python.h file is located in /usr/include/Python2.7/python.h
    Can anyone tell me what to set?

    Thanks and sorry for my English

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to the forums

      Are you using Qt for Python/pySide2 or what is the bindings?
      Or is it a c++ project that uses python?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jonh78
        wrote on last edited by
        #3

        Hello
        is a console project where I have some # include of a C ++ library not made by me that uses modules written in python2.7

        #include <string>
        #include <iostream>
        #include <cmath>
        #include <opencamlib.arc.hpp>
        #include ...........
        ............

        the error is generated in the file /usr/include/boost/python/detail/wrap_python.hpp

        I also have the library file already compiled ocl.pyd
        can I use another way to call up the functions of this library?

        When I compile the library project from its source files it doesn't generate any errors so I think it's a problem with my project settings

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          so its this file ?
          https://www.boost.org/doc/libs/1_34_0/boost/python/detail/wrap_python.hpp

          Also, is pyd files not just for windows?
          Im not python user so would be wrong but it might not work in ubuntu.

          In any case, how are u then using the files if not via PYD ?

          1 Reply Last reply
          1
          • J Offline
            J Offline
            Jonh78
            wrote on last edited by
            #5

            sorry you are right I explained myself wrongly the file ocl.pyd is compiled to be used in windows then I have the ocl.so version which is for Ubuntu but I don't know how to call the functions of these libraries from a QtCreator project .... .

            mrjjM 1 Reply Last reply
            0
            • J Jonh78

              sorry you are right I explained myself wrongly the file ocl.pyd is compiled to be used in windows then I have the ocl.so version which is for Ubuntu but I don't know how to call the functions of these libraries from a QtCreator project .... .

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Jonh78
              Im have never used a pythn SO file before but i wonder if you can call like normally.

              https://stackoverflow.com/questions/17081131/how-can-a-shared-library-so-call-a-function-that-is-implemented-in-its-loadin

              What inside the SO file. c function, objects or python function ?
              I assume you mean you want to call it from c++ ?

              1 Reply Last reply
              0
              • J Offline
                J Offline
                Jonh78
                wrote on last edited by
                #7

                Yes from a C ++ project I would like to recall the functions of this library which contains both C ++ code and python modules but being brand new to QtCreator and quite new to C ++ I don't know how to do it .... so far I have always programmed in VisualBasic or C #

                Now I try to take a look at the link you posted

                1 Reply Last reply
                0

                • Login

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