?Hey Frank,

first of all the error itself is caused by missing vc redistributables on the 
machine. This should not be the case if Nuke is installed because Nuke also 
needs them. But in addition the Version it tries to load is off-. MSVCR120 
seems to indicate you are using Visual Studio 2013?


You need to use VS 2010 or use 2015 and use 2010 ans the target platform. The 
latter only works if you either have installed VS2010 before VS 2015 (trial is 
enough) or install the matching PSDK for that version prior to VS 2015.


Cheers,

Thorsten


---
Thorsten Kaufmann
Production Pipeline Architect

Mackevision Medien Design GmbH
Forststraße 7
70174 Stuttgart

T +49 711 93 30 48 661
F +49 711 93 30 48 90
M +49 151 19 55 55 02

thorsten.kaufm...@mackevision.com
www.mackevision.com<http://www.mackevision.com/?utm_source=E-Mail-Signatur&utm_medium=E-Mail&utm_campaign=Mackevision-Link>

Geschäftsführer: Armin Pohl, Joachim Lincke, Jens Pohl
HRB 243735 Amtsgericht Stuttgart

---
PORTFOLIO: The Next Level of User Experience - Real-time 
Solutions<http://www.mackevision.com/portfolio/real-time-solutions/?utm_source=E-Mail-Signatur&utm_medium=E-Mail&utm_campaign=real-time-signatur>
VFX: Game of Thrones, Season 6 - VFX 
breakdown<http://www.mackevision.com/references/game-of-thrones-season-6-vfx-breakdown/?utm_source=E-Mail-Signatur&utm_medium=E-Mail&utm_campaign=GoT-S6-vfx-breakdown-Signatur>
SOCIAL: Follow us on Facebook<https://www.facebook.com/mackevision/>, 
Twitter<https://twitter.com/Mackevision>, 
Behance<https://www.behance.net/mackevision> and 
Vimeo<https://vimeo.com/mackevision>

________________________________
Von: nuke-python-boun...@support.thefoundry.co.uk 
<nuke-python-boun...@support.thefoundry.co.uk> im Auftrag von Frank 
Rueter|OHUfx <fr...@ohufx.com>
Gesendet: Sonntag, 11. Dezember 2016 11:03
An: Nuke Python discussion; nuke-...@support.thefoundry.co.uk
Betreff: [Nuke-python] trouble compiling python extension for Nuke on windows

Hi all,

I am trying to compile a python package for Nuke via Cython.
All seems to work well on osx and linux, but on windows I get this error when 
trying to import the main module from within Nuke (i.e. the parent folder of 
the main module is added via nuke.pluginAddPath() which shoudl also add it to 
PYTHONPATH):
    ImportError: DLL load failed

When I try to import the module in the systems python terminal I get an error 
complaining about a missing MSVCR120.dll.
However, if I make sure the python terminal's work directory is the parent 
folder of the main module, I can successfully import it.

I assume I am not compiling the extensions with the correct dependencies or 
something?

My setup.py file looks like this (using setuptools 30.4.0):
import shutil
from setuptools import setup
from setuptools import Extension

from Cython.Build import cythonize
from Cython.Distutils import build_ext

sourceFiles = ['path/to/packageA/moduleA.py',
                       path/to/packageB/moduleB.py',
                       path/to/packageC/moduleC.py',
                     ]

################ COMPILE
setup (
    ext_modules = cythonize(sourceFiles),
    #packages = ['model', 'view', 'controller'],
    package_dir = {'A':'path/to/packageA',
                   'B':'path/to/packageB',
                   'C':'path/to/packageC'},
    #package_data = {'packageA':'__init__.py'}
)
And the command to run it is simply:
python setup.py build_ext --inplace

I have never seriously tried to compile python code and I usually don't use 
windows either, so I'm sure it's a newbie mistake.
Any help would be greatly appreciated!

Cheers,
frank


--
[ohufxLogo 50x50]<http://www.ohufx.com> vfx 
compositing<http://ohufx.com/index.php/vfx-compositing> | workflow 
customisation and consulting<http://ohufx.com/index.php/vfx-customising>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to