Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2795

pyside6-designer does not set environment for editable Python packages correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P4: Low
    • None
    • 6.7
    • PySide
    • None
    • macOS

    Description

      While using pyenv + pyside, the pyside-designer starts, finds plugins correctly but fails to import third-party libraries that are installed in the pyenv environment. I was able to reproduce the issue also with venvs (virtual environments). However, when started using conda, the environment seems to be resolved correctly and the plugin works as expected. 

       

      Example pyenv:

      "DYLD_INSERT_LIBRARIES": "/Users/user_name/.pyenv/versions/3.12.2/lib/libpython3.12.dylib",
      "PYSIDE_DESIGNER_PLUGINS": "/Users/user_name/examples/plugin_example_pyside",
      
      cmd:
      /Users/user_name/.pyenv/versions/3.12.2/envs/pyside_debug/lib/python3.12/site-packages/PySide6/Designer.app/Contents/MacOS/Designer
      
      

       
      Example conda:

      "DYLD_INSERT_LIBRARIES": "/Users/user_name/anaconda3/envs/pyside_debug/lib/libpython3.11.dylib",
      "PYSIDE_DESIGNER_PLUGINS": "/Users/user_name/examples/plugin_example_pyside",
      
      cmd: 
      /Users/user_name/anaconda3/envs/pyside_debug/lib/python3.11/site-packages/PySide6/Designer.app/Contents/MacOS/Designer

       
      When launched with pyenv or venv, the designer reports that the third-party dependency (bec_widgets) cannot be imported:

      qt.pysideplugin: Error running /Users/user_name/examples/plugin_example_pyside/registertictactoe.py: No module named 'bec_widgets' 

      (registertictactoe imports "bec_widgets")
       
      Same plugin code with conda works. 
       
      Both scenarios were tested on 
      PySide6             6.7.2
      PySide6_Addons      6.7.2
      PySide6_Essentials  6.7.2
       
      Is there anything that must be set up differently for pyenv and venvs from conda environments?
       
      Thanks in advance for any guidance you can provide!
       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              shpremna Shyamnath Premnadh
              wakonigk Klaus Wakonig
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes