Python Libraries (eg Numpy, PIL etc...) & Cinema4D



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

    On 23/10/2011 at 04:57, xxxxxxxx wrote:

    Hi there,

    I'm looking at creating a python generator that's using some python Libraries (NumPy, SciPy, PIL and MatPlotLib). I've got the effect already coded up in python and its working as expected, however I'm now looking at integrating this with Cinema4D.

    The problem is that Cinema4D uses its own python installation, and the libraries I'm using aren't installed with Cinema4D's version of python. How would I go about setting Cinema4D up with a library such as NumPY ?

    Thanks,
    -Matt



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

    On 23/10/2011 at 08:08, xxxxxxxx wrote:

    Download the appropriate Installer of NumPy (for Python 2.6) and choose the Python installation of C4D for installation.
    But note that there are some problems when using 3rd party packages, especially C extensions.

    - 32 Bit and 64 Bit must be installed seperately  
    - Most C packages do not support 64 bit  
    - The user using your plugin must install the 3rd party package
    

    I'm sure there are some more, just to point out the most important ones.

    Locations that might interest you:

    Python binary location:      .../MAXON/Cinema 4D/resource/modules/python/res/PythonXXX.framework  
    Python extension locations (win / don't know on mac) : %APPDATA%/MAXON/Cinema 4D/library/python/XXX/
    

    Cheers, Niklas



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

    On 23/10/2011 at 12:29, xxxxxxxx wrote:

    I expected as much on the 64bit side of things.

    Thanks for the pointers, I'll give it a go tomorrow I think.

    -Matt



  • On 17/04/2015 at 02:26, xxxxxxxx wrote:

    i still cant in install numpy for c4d
    it shows

    Python version2.6 required, which was not found in the registry

    but i cant change the directory of numpy installation



  • On 27/04/2015 at 05:07, xxxxxxxx wrote:

    You cannot use the default installer because C4D is not registered as a Python environment in your system. If you have a Python-2.6 installation on your system you can use it as a target and copy the files over to the Python directory of C4D, unless the package contains C-modules (which is for example the case for Numpy).

    In that case you can't use the official installer of Numpy either because it was compiled with a different compiler. For Python the compilers must match exactly and therefore the only way to run Numpy properly in C4D is to compile it by yourself with Visual Studio 2010 (including all updates).



  • On 27/04/2015 at 05:40, xxxxxxxx wrote:

    I've got a compiled version of Numpy 1.9.1. You can download it from my Website: http://blog.niklasrosenstein.com/2015/04/numpy-in-cinema-4d/



  • On 28/04/2015 at 05:43, xxxxxxxx wrote:

    Cool! Thanks

    -b



  • On 28/04/2015 at 22:51, xxxxxxxx wrote:

    I can't download it.
    It says: Oops! That page can't be found



  • On 02/05/2015 at 11:18, xxxxxxxx wrote:

    Links are working now for: NumPy, Scipy, Cython

    Thanks a lot Nicklas!



  • On 04/05/2015 at 04:59, xxxxxxxx wrote:

    Hello
    About Cython

    Has anybody such issue with Compiling withcython.inline > http://docs.cython.org/src/reference/compilation.html#compiling-with-cython-inline
    It can not find vcvarsall.bat in c4d (having of vs2012). I try different modes, even simply return file with arch=x64
    For example i can compile from pyx files in cmd or from bat file



  • On 04/05/2015 at 06:09, xxxxxxxx wrote:

    To compile with Cython you need the same setup as to compile any C Extension for Python.



  • On 04/05/2015 at 06:35, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    To compile with Cython you need the same setup as to compile any C Extension for Python.

    Hello Niklas. Thank you. I build pyd slightly differ
    Yeah i do it, search over net, i found trick, that adding sys environment VS90COMNTOOLS = %VS110COMNTOOLS% . I was very unmindful
    (without any mods in lib dir/pyDir or continuously adding of environment variables in pycode)

    so we get inline codinig, closer in houdini 👏


Log in to reply