<?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 Re: Python script module: import numpy not working... in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6637933#M19193</link>
    <description>l am using osx 10.10.5. I will a try on osx 10.11.6. Looks like there is compatibility issue btween the numpy and the python shipped with Fusion 360 on osx 10.11.6.&lt;BR /&gt;&lt;BR /&gt;Jack</description>
    <pubDate>Fri, 21 Oct 2016 16:27:40 GMT</pubDate>
    <dc:creator>liujac</dc:creator>
    <dc:date>2016-10-21T16:27:40Z</dc:date>
    <item>
      <title>Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6629964#M19186</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp;python script&amp;nbsp;where&amp;nbsp;I&amp;nbsp;want to import&amp;nbsp;functions from numpy to use in fusion360.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Mac with Python 2.7 which has the numpy module installed in /usr/local/lib/python2.7/site-packages. And from my Mac console python command line, I can import numpy&amp;nbsp;successfully,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ python&lt;BR /&gt;Python 2.7.10 (default, Sep 14 2015, 02:26:06) &lt;BR /&gt;[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin&lt;BR /&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; import numpy as np&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; a = np.array([1, 2, 3])&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; print type(a)&lt;BR /&gt;&amp;lt;type 'numpy.ndarray'&amp;gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've read over this &lt;A href="http://forums.autodesk.com/t5/api-and-scripts/to-install-python-modules/m-p/5785679#M674" target="_self"&gt;previous forum&lt;/A&gt; and it helped me to get going, but now I'm getting an import failure when I try to import numpy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my test script I am loading into Fusion360:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import adsk.core, adsk.fusion, traceback

##  1) did not work
#import sys
#sys.path.append("/usr/local/lib/python2.7/site-packages")
#import numpy as np

##  2) did not work
#import imp
#f, filename, desc = imp.find_module('numpy', ['/usr/local/lib/python2.7/site-packages'])
#np = imp.load_module('numpy', f, filename, desc)

##  3) almost works, but python crashes importing numpy
import sys
sys.path[0:0] = '/usr/local/lib/python2.7/site-packages'
import numpy as np&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Fusion360, I have clicked "Scripts and Add-ins" and selected my script and clicked "Edit". So now I am able to run and debug in the Spyder Python GUI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run&amp;nbsp;this test script in the Fusion360 Spyder GUI, I get this error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Welcome to Autodesk Fusion360 console!
Sample script:
	import adsk.core
	app = adsk.core.Application.get()
	help(app)

&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):
  File "/Users/ali/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts/test_numpy_load/test_numpy_load.py", line 16, in &amp;lt;module&amp;gt;
    import numpy as np
  File "/usr/local/lib/python2.7/site-packages/numpy/__init__.py", line 180, in &amp;lt;module&amp;gt;
    from . import add_newdocs
  File "/usr/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in &amp;lt;module&amp;gt;
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in &amp;lt;module&amp;gt;
    from .type_check import *
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in &amp;lt;module&amp;gt;
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in &amp;lt;module&amp;gt;
    from . import multiarray
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): Symbol not found: _PyBuffer_Type
  Referenced from: /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so
  Expected in: flat namespace
 in /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so

&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;P&gt;Any pointers would be helpful and appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2016 18:43:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6629964#M19186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-18T18:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6630484#M19187</link>
      <description>&lt;P&gt;And another piece of info, I believe my numpy is 64bit from this on Mac python console,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ python
Python 2.7.10 (default, Sep 14 2015, 02:26:06) 
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt; import numpy.distutils.system_info as sysinfo
&amp;gt;&amp;gt;&amp;gt; sysinfo.platform_bits
64
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:50:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6630484#M19187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-18T22:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6630856#M19188</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fusion 360 is using Python 3.3.5 (64-bit). You installed numpy for Python 2.7, that is not compatible with Python 3.3.5. You have to install numpy for Python 3.3.5 ( 64-bit ) and import the numpy. The following example should work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;        import sys
        sys.path.append('/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages')
        import numpy as np
        a = np.array([1, 2, 3])
        print(type(a))&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 05:47:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6630856#M19188</guid>
      <dc:creator>liujac</dc:creator>
      <dc:date>2016-10-19T05:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6633704#M19189</link>
      <description>&lt;P&gt;Just some more details as I debug...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After many mis-steps and a broken Mac default Python install, I finally got 3.3.5 installed on my Mac using pyenv, with numpy installed using easy_install,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ pwd
/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages
$ ls -ld numpy*
drwxr-xr-x  27 root  staff  918 Oct 19 11:59 numpy/
drwxr-xr-x   9 root  staff  306 Oct 19 11:59 numpy-1.11.2.dist-info/&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So now I can import this module on the Mac command-line Python,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ python3.3 --version
Python 3.3.5
$ cat mac_test_numpy_load.py 
import sys
# put at end
#sys.path.append('/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages')
# put at start
sys.path.insert(0,"/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages")
import numpy as np
print (np.__path__)
$ python3.3 mac_test_numpy_load.py 
['/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy']&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I run this same script (which also loadsadsk.core, adsk.fusion, traceback), I get the same error response looking for multiarray,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Welcome to Autodesk Fusion360 console!
Sample script:
	import adsk.core
	app = adsk.core.Application.get()
	help(app)

&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):
  File "/Users/ali/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts/test_numpy_load/test_numpy_load.py", line 7, in &amp;lt;module&amp;gt;
    import numpy as np
  File "/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/__init__.py", line 142, in &amp;lt;module&amp;gt;
    from . import add_newdocs
  File "/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/add_newdocs.py", line 13, in &amp;lt;module&amp;gt;
    from numpy.lib import add_newdoc
  File "/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/lib/__init__.py", line 8, in &amp;lt;module&amp;gt;
    from .type_check import *
  File "/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/lib/type_check.py", line 11, in &amp;lt;module&amp;gt;
    import numpy.core.numeric as _nx
  File "/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/core/__init__.py", line 14, in &amp;lt;module&amp;gt;
    from . import multiarray
ImportError: dlopen(/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/core/multiarray.so, 2): Symbol not found: _PyBool_Type
  Referenced from: /Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/core/multiarray.so
  Expected in: /Users/ali/Library/Application Support/Autodesk/webdeploy/production/8beef08b232ffde48d2a02741cfc403a7f8753bf/Autodesk Fusion 360.app/Contents/MacOS/Autodesk Fusion 360
 in /Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages/numpy/core/multiarray.so&lt;/PRE&gt;&lt;P&gt;Next step is to remove other numpy installs in,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 06:12:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6633704#M19189</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-20T06:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6633728#M19190</link>
      <description>&lt;P&gt;No luck so far - any more help would be&amp;nbsp;appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ which python3.3
/usr/local/bin/python3.3
$ find /System/Library/Frameworks/Python.framework/ -name numpy
$ find /Library/Frameworks/Python.framework/ -name numpy
$ find ~/Library/Frameworks -name numpy&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 06:33:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6633728#M19190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-20T06:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6633795#M19191</link>
      <description>&lt;P&gt;I did not use pyenv. Here are the steps I installed Python 3.3.5 and numpy:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;Download &lt;A href="http://www.python.org/ftp/python/3.3.5/python-3.3.5-macosx10.6.dmg" target="_blank"&gt;Python 3.3.5&lt;/A&gt;, and install to your Mac.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Download &lt;A href="https://bootstrap.pypa.io/get-pip.py" target="_blank"&gt;get-pip.py&lt;/A&gt; file to your Mac. Enter "python3 /users/liujac/downloads/get-pip.py" in Terminal to install pip.&lt;/P&gt;
&lt;P&gt;3. Enter "python3 -m pip install numpy"&amp;nbsp;in Terminal to install numpy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the steps above, the numpy is installed to "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages"&lt;/P&gt;
&lt;P&gt;$ find /Library/Frameworks -name numpy&lt;BR /&gt;/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/numpy&lt;BR /&gt;/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/numpy/core/include/numpy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the script below in Fusion 360, it works.&lt;/P&gt;
&lt;PRE&gt;import adsk.core, adsk.fusion, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        
        import sys
        sys.path.append('/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages')
        import numpy as np
        a = np.array([1, 2, 3])
        print(type(a))
        print(np.__path__)
        
        ui.messageBox('Done')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 07:19:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6633795#M19191</guid>
      <dc:creator>liujac</dc:creator>
      <dc:date>2016-10-20T07:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6635449#M19192</link>
      <description>&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks that's great advice, and very detailed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Initially that was my thinking as well, but the Python 3.3.5 Mac installer had crashed for me. So I was unable to install 3.3.5 that way. Maybe it's my Mac running 10.11.6 that is causing the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="install_3.3.5.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/284062i0C26028F68BB5D0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="install_3.3.5.png" alt="install_3.3.5.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried Homebrew to install 3.3.5 but it doesn't support 'versions' anymore, so if I brew install python3, I get 3.5 or something latest. I can't pick specifically the 3.3.5 release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found I could install the 3.3.5 release with pyenv. It places the full Python install directory structure into my $HOME directory, and I got the numpy module installed in there. And as I mentioned previously, I can run python3.3 from the Mac cmd-line, add the path with sys.path.append,&amp;nbsp;and import numpy no problem. And printing np.__path__ shows I'm truly loading that module.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As a last attempt, I made a sym-link in /Library so now I have the same directory structure as in your script,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ pwd
/Library/Frameworks/Python.framework/Versions
$ ls -l
total 8
lrwxr-xr-x  1 root  wheel  32 Oct 20 10:44 3.3 -&amp;gt; /Users/ali/.pyenv/versions/3.3.5

$ cd /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages
$ pwd
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages
$ ls
README                       numpy/                       pip-8.1.2.dist-info/         setuptools-28.6.1.dist-info/
__pycache__/                 numpy-1.11.2.dist-info/      pkg_resources/               wheel/
easy_install.py              pip/                         setuptools/                  wheel-0.29.0.dist-info/

$ pwd -P
/Users/ali/.pyenv/versions/3.3.5/lib/python3.3/site-packages

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified your script just slightly to try both of these scenarios, but both produces the same failure for me,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        sys.path.insert(0,'/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages')
        #sys.path.append('/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the failure when I have it as shown above with sys.path.insert()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jack_script_crash.png" style="width: 398px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/284112i95E9E9E97B7D4C2B/image-size/large?v=v2&amp;amp;px=999" role="button" title="jack_script_crash.png" alt="jack_script_crash.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel I'm really close to figuring this out but missing some fundamental piece of information...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anything else I should check?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 18:01:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6635449#M19192</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-20T18:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6637933#M19193</link>
      <description>l am using osx 10.10.5. I will a try on osx 10.11.6. Looks like there is compatibility issue btween the numpy and the python shipped with Fusion 360 on osx 10.11.6.&lt;BR /&gt;&lt;BR /&gt;Jack</description>
      <pubDate>Fri, 21 Oct 2016 16:27:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6637933#M19193</guid>
      <dc:creator>liujac</dc:creator>
      <dc:date>2016-10-21T16:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6643125#M19194</link>
      <description>&lt;P&gt;Hi Sean,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I reproduced your problem on Mac 10.11.6. Use cmd "$ /Users/jackliu/.pyenv/versions/3.3.5/bin/python -m pip install numpy" to install numpy, it downloads the sources code, and builds the binaries with the gcc on the Mac. Unfortunately, the gcc version on Mac 10.11.6 is different with the gcc version used to build Python 3.3.5 packed in Python official installer, seems there is compatibility issue between the two gcc versions, that causes some binaries of the numpy built on this&amp;nbsp;Mac are not compatible with the Python 3.3.5 packed in Python official installer. Fusion 360 just packed the Python 3.3.5 installed from Python official installer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enter "gcc -v" in Terminal on my Mac 10.11.6:&lt;/P&gt;
&lt;PRE&gt;$gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;GCC version of Python 3.3.5 packed with Fusion 360.&lt;/P&gt;
&lt;PRE&gt;$ /Users/jackliu/Library/Application\ Support/Autodesk/webdeploy/shared/PYTHON/3.3.5/MAC64c/Python.framework/Versions/3.3/bin/python 
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 01:12:57) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To resolve this problem, you need to use "pip install" with option "--only-binary" to install numpy, that will not build the source code just download the binaries. For example:&lt;/P&gt;
&lt;PRE&gt;$ /Users/jackliu/.pyenv/versions/3.3.5/bin/python -m pip install --only-binary :all: numpy
Collecting numpy
Using cached numpy-1.11.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.11.0&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jack&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 05:48:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6643125#M19194</guid>
      <dc:creator>liujac</dc:creator>
      <dc:date>2016-10-25T05:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6648291#M19195</link>
      <description>&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for figuring that out - I'm now able to import numpy into F360!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Turns out I actually had to pip uninstall numpy first and then install with your options to get the right version. But it's working!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 23:32:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/6648291#M19195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-26T23:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/9085238#M19196</link>
      <description>&lt;P&gt;Hello nice work on this work perfectly as this error was disturbing me greatly thank you for the help.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 14:25:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/9085238#M19196</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-14T14:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/9868486#M19197</link>
      <description>&lt;P&gt;for windows if anyone is curious:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sys.path.append('C:\\Users\\name\\AppData\\Local\\Programs\\Python\\PythonXX\\Lib\site-packages')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just replace 'name' with your username and 'PythonXX' with the version of python the package you'd like to use is installed in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure if this will work with older or newer versions of python than what fusion is currently using.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 22:35:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/9868486#M19197</guid>
      <dc:creator>jc8000</dc:creator>
      <dc:date>2020-11-13T22:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Python script module: import numpy not working...</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/10358965#M19198</link>
      <description>&lt;P&gt;I found a simpler solution that you don't need to look for python folders or version. Put the below script before importing numpy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import sys
import subprocess
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'numpy'])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can remove the script after running once. The script will not give you an error but will slow down the script a bit.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 17:37:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/python-script-module-import-numpy-not-working/m-p/10358965#M19198</guid>
      <dc:creator>hyki</dc:creator>
      <dc:date>2021-06-02T17:37:10Z</dc:date>
    </item>
  </channel>
</rss>

