Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Register
    • Login

    R24.111: shiboken2 fails to load (Win10)

    General Talk
    python s24
    3
    3
    840
    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.
    • jcooperJ
      jcooper
      last edited by

      At our facility we have PySide2 installed for python 3.9, which of course includes the shiboken2 package. However, for some reason it fails to load in either c4dpy.exe or the python console (in the C4D application). It loads just fine in the python.exe that ships with C4D R24.

      ImportError: DLL load failed while importing shiboken2: The specified module could not be found.

      Why might this be happening and how can we fix this? Our pipeline tools are all PySide/PySide2 based and they work without problems inside older versions of C4D such as R18, R19, R20, R21.

      (And yes, the location of shiboken2 is in sys.path, as evidenced by the fact that other modules at the same level as shiboken2 import without problems.)

      JOHN COOPER I TECHNICAL DIRECTOR
      PSYOP LA

      K 1 Reply Last reply Reply Quote 1
      • ferdinandF
        ferdinand
        last edited by

        Hello @jcooper,

        thank you for reaching out to us. First of all, I must point out that what you are trying to do is out of scope of support. We cannot support third party libraries as stated in our Forum Guidelines and we especially cannot support third party GUIs.

        The little help I can give you here is to say:

        1. There is currently a bug in R25 which will cause faulty installations when using pip and having a vanilla CPython installation of the same version on the system. The installation itself will work fine, but the import paths of both Pythons will become entangled in this case due CPython having some hardcoded import paths in its code pointing to the user directories. We have fixed this problem and the fix will be delivered with an upcoming release. You can check this easily by checking the installation paths of modules with the ```fileattribute of the module. When you are encountering the problem, it will be pointing towards yourCPython`` site-packages and not the
          one from Cinema. There is not much what you can do to fix this yourself (aside from monkey-patching our Python yourself).
        2. There is more than sys.path in Python, there is also sys.meta_path and relative imports, so just being able to import other packages in the same path is no guarantee that everything is fine.

        I cannot say much more with the given little information, and we can unfortunately also not support third party libraries. You should check if indeed is everything installed in the correct location. The problem you have could be related to what I describe under 1., but that bug did exist for quite some time, so it should have failed before.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • K
          kapellan @jcooper
          last edited by kapellan

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post