Installing a 64-bit version of Python did the trick!

Thanks a lot for your help Sebastian and Nathan.

Best regards,
Simon



-------------------------------
Simon Björk
Compositor/TD

+46 (0)70-2859503
www.bjorkvisuals.com

2014-10-20 16:14 GMT+02:00 Sebastian Kral <m...@sebastiankral.de>:

> Hi Simon,
>
> remember to use the proper architecture. 64 Bit vs. 32 Bit. You can't
> import the 64 Bit PyOpenColorIO into a 32 Bit Python instance.
>
> Cheers,
> Sebastian
>
> On Monday, October 20, 2014, Simon Björk <si...@bjorkvisuals.com> wrote:
>
>> Thanks for your reply Nathan, it makes sense.
>>
>> However, I still can't get it to work. I apologize if I'm missing
>> something obvious here.
>>
>> import os
>> import sys
>>
>> sys.path.append("C:\\Program Files\\Nuke8.0v5\\plugins\\")
>>
>> for i in os.environ["PATH"].split(";"):
>> print i
>>
>> import PyOpenColorIO
>>
>> >>>>>
>>
>> C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
>> C:\Windows\system32
>> C:\Windows
>> C:\Windows\System32\Wbem
>> C:\Windows\System32\WindowsPowerShell\v1.0\
>> C:\Program Files (x86)\QuickTime\QTSystem\
>> C:\Program Files (x86)\Common Files\Acronis\SnapAPI\
>> C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
>> C:\Windows\system32
>> C:\Windows
>> C:\Windows\System32\Wbem
>> C:\Windows\System32\WindowsPowerShell\v1.0\
>> C:\Program Files (x86)\QuickTime\QTSystem\
>> C:\Program Files (x86)\Python27
>> C:\Program Files\Nuke8.0v5
>> Traceback (most recent call last):
>>   File "E:\tmp\python\python_tmp.py", line 9, in <module>
>>     import PyOpenColorIO
>> ImportError: DLL load failed: %1 is not a valid Win32 application.
>> [Finished in 0.2s]
>>
>>
>>
>> -------------------------------
>> Simon Björk
>> Compositor/TD
>>
>> +46 (0)70-2859503
>> www.bjorkvisuals.com
>>
>> 2014-10-19 21:40 GMT+02:00 Nathan Rusch <nathan_ru...@hotmail.com>:
>>
>>> Your hunch is correct in that you need to make sure OpenColorIO.dll can
>>> be found by the loader. On Windows, you can do this by adding the
>>> appropriate directory (in this case, C:/Program Files/Nuke8.0v5), to the
>>> PATH environment variable.
>>>
>>> You still obviously need to add the 'plugins' subdirectory to sys.path.
>>>
>>> -Nathan
>>>
>>>
>>> From: Simon Björk
>>> Sent: Sunday, October 19, 2014 5:12 AM
>>> To: Nuke Python discussion
>>> Subject: [Nuke-python] PyOpenColorIO module outside of Nuke?
>>>
>>>
>>> I've been trying to get the PyOpenColorIO module to work on my Windows
>>> workstation, but without any success.
>>>
>>> What I realised though is that Nuke ships with this module and it's
>>> working as expected. Is there a way to use those files (PyOpenColorIO.pyd,
>>> OpenColorIO.dll) in an external IDE?
>>>
>>> I've tried:
>>>
>>> import sys
>>> sys.path.append("C:/Program Files/Nuke8.0v5/")
>>> sys.path.append("C:/Program Files/Nuke8.0v5/plugins")
>>> import PyOpenColorIO
>>>
>>> This throws an ImportError: DLL load failed: %1 is not a valid Win32
>>> application.
>>>
>>> But I'm not sure if this is the right approach? Does the OpenColorIO.dll
>>> need to be placed at a specific path (envs)? I remember something about it
>>> being so on Linux.
>>>
>>> * I do not have the knowledge to compile my own version from the OCIO
>>> github.
>>> * I do know that Nuke currently uses a old version of OCIO.
>>> * I could get this working by importing the nuke module in the IDE, but
>>> that seems like a slow workaround.
>>>
>>> Best regards,
>>> Simon
>>>
>>>
>>>
>>>
>>> ------------------------------- Simon Björk
>>> Compositor/TD
>>>
>>> +46 (0)70-2859503
>>> www.bjorkvisuals.com
>>>
>>> _______________________________________________
>>> 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
>>> _______________________________________________
>>> 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
>>>
>>
>>
>
> --
> Sent from mobile device
>
> _______________________________________________
> 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
>
>
_______________________________________________
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