Python External Library



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/10/2010 at 07:53, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R12 
    Platform:      Mac OSX  ; 
    Language(s) :       PYTHON  ;

    ---------
    Hi, I'm new to python--

    One of the big selling points of python is its ability to load libraries.   I can load them in standard python using the terminal.  I can't seem to load them within c4d however.
    < ="utf-8">

    1. Is it possible to load external libraries?
      --- if so, how?

    2. If i use a library in a python plugin, what is involved in distributing that plugin? (assuming plugin license issues are squared away)

    Thanks,
    Jonah⭐



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/10/2010 at 08:26, xxxxxxxx wrote:

    Hi jonahtobias,

    Python in C4D has its own Python environment on board, so you need to copy the Python lib to specific folders in c4d. You can find these information in the FAQ section of the documentation or check out sys.path.

    You can also copy the library to the folder of your Python Plugin, just add the path to sys.path.

    I recommend to ensure the user copies the external Python lib to {USERFOLDER}/library/python/packages/{osx/win32/win64}.

    Cheers, Sebastian


Log in to reply