<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can't import arnold module with Python 3 in Arnold General Rendering Forum</title>
    <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046802#M3557</link>
    <description>&lt;P&gt;With Arnold 5.2.0.0 that ships with Maya 2017, the following code works with Python 2.7 but fails with Python 3.6:&lt;/P&gt;&lt;PRE&gt;import os
import sys

sys.path.insert(0, 'C:/solidangle/mtoadeploy/2017/scripts')
os.environ['PATH'] += ';C:/solidangle/mtoadeploy/2017/bin'

import arnold
print(arnold.AiGetVersion())
&lt;/PRE&gt;&lt;P&gt;Here's the output with Python 2.7:&lt;/P&gt;&lt;PRE&gt;['5', '2', '0', '0']
&lt;/PRE&gt;&lt;P&gt;and the error with Python 3.6:&lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
  File "D:\temp\test.py", line 7, in &amp;lt;module&amp;gt;
    import arnold
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\__init__.py", line 6, in &amp;lt;module&amp;gt;
    from .ai_color_managers import *
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\ai_color_managers.py", line 7, in &amp;lt;module&amp;gt;
    from .ai_nodes import *
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\ai_nodes.py", line 9, in &amp;lt;module&amp;gt;
    from .ai_universe import AtUniverse
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\ai_universe.py", line 7, in &amp;lt;module&amp;gt;
    import ai_nodes
ModuleNotFoundError: No module named 'ai_nodes'
&lt;/PRE&gt;&lt;P&gt;This is caused by this `import ai_nodes` statement.&lt;/P&gt;&lt;P&gt;Interestingly, Arnold 5.1.1.1 does not have that statement and consequently the sample code works fine with Python 3.6.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Aug 2018 13:26:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-24T13:26:04Z</dc:date>
    <item>
      <title>Can't import arnold module with Python 3</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046802#M3557</link>
      <description>&lt;P&gt;With Arnold 5.2.0.0 that ships with Maya 2017, the following code works with Python 2.7 but fails with Python 3.6:&lt;/P&gt;&lt;PRE&gt;import os
import sys

sys.path.insert(0, 'C:/solidangle/mtoadeploy/2017/scripts')
os.environ['PATH'] += ';C:/solidangle/mtoadeploy/2017/bin'

import arnold
print(arnold.AiGetVersion())
&lt;/PRE&gt;&lt;P&gt;Here's the output with Python 2.7:&lt;/P&gt;&lt;PRE&gt;['5', '2', '0', '0']
&lt;/PRE&gt;&lt;P&gt;and the error with Python 3.6:&lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
  File "D:\temp\test.py", line 7, in &amp;lt;module&amp;gt;
    import arnold
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\__init__.py", line 6, in &amp;lt;module&amp;gt;
    from .ai_color_managers import *
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\ai_color_managers.py", line 7, in &amp;lt;module&amp;gt;
    from .ai_nodes import *
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\ai_nodes.py", line 9, in &amp;lt;module&amp;gt;
    from .ai_universe import AtUniverse
  File "C:/solidangle/mtoadeploy/2017/scripts\arnold\ai_universe.py", line 7, in &amp;lt;module&amp;gt;
    import ai_nodes
ModuleNotFoundError: No module named 'ai_nodes'
&lt;/PRE&gt;&lt;P&gt;This is caused by this `import ai_nodes` statement.&lt;/P&gt;&lt;P&gt;Interestingly, Arnold 5.1.1.1 does not have that statement and consequently the sample code works fine with Python 3.6.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:26:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046802#M3557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-24T13:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can't import arnold module with Python 3</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046803#M3558</link>
      <description>&lt;P&gt;Sorry for the formatting but the text editor is extremely buggy...&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:26:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046803#M3558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-24T13:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't import arnold module with Python 3</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046804#M3559</link>
      <description>&lt;P&gt;In ai_universe.py, change line 7 to this:&lt;/P&gt;&lt;PRE&gt;from .ai_nodes import *&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Aug 2018 21:35:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046804#M3559</guid>
      <dc:creator>Stephen.Blair</dc:creator>
      <dc:date>2018-08-28T21:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can't import arnold module with Python 3</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046805#M3560</link>
      <description>&lt;P&gt;@Stephen Blair: That's not enough as the code references the ai_nodes package name later on, for instance&lt;/P&gt;&lt;PRE&gt;return NullToNone(func(universe), POINTER(ai_nodes.AtNode))&lt;/PRE&gt;&lt;P&gt;in `_AiUniverseGetOptions()`. Removing all `ai_nodes.` prefixes appears to solve the problem.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 12:37:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046805#M3560</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-29T12:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can't import arnold module with Python 3</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046806#M3561</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://answers.arnoldrenderer.com/users/1906/franz.html" nodeid="1906"&gt;@FranÃ§ois Beaune&lt;/A&gt; I solved it by changing line 7 in ai_universe.py to this, you'll have to ensure arnold is apart of your PATH environment variable: &lt;/P&gt;&lt;PRE&gt;from arnold import ai_nodes&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Aug 2018 13:09:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/can-t-import-arnold-module-with-python-3/m-p/11046806#M3561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-29T13:09:20Z</dc:date>
    </item>
  </channel>
</rss>

