UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Qml/Python] Using pip packages with Clickable

    Scheduled Pinned Locked Moved App Development
    2 Posts 2 Posters 240 Views 1 Watching
    Loading More Posts
    • 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.
      • U Offline
        utuser
        last edited by

        Hello.

        I'm starting with UT app development in Python and QML and encountered a problem using pip packages.

        Whenever I want to use manually installed pip packages, using any of its functions yields an AttributeError e.g.:

        PySide2.__version__

        AttributeError: module 'PySide2' has no attribute '__version__'
        

        which returns a PySide2 version, when entered using python3 command line in terminal.

        In Python/QML project, I used sys to embed the PySide2 package:

        import sys
        sys.path.append('lib/python3.8/site-packages')
        
        import PySide2
        

        dir(PySide2) returns

        [__doc__,__loader__,__name__,__package__,__path__,__spec__]
        

        so the __version__ seems inaccessible.

        What could be the reason of it?

        I'm relatively new user in UT app development and I'd like to sorry for any possible non-compliances.

        I'm using Docker container qtcreator ide.

        1 Reply Last reply Reply Quote 0
        • mateo_saltaM Offline
          mateo_salta
          last edited by

          are the packages shipped with the click, or on the device - if installed on the root of the device maybe the click would need to be unconfined?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post