<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nrfutil on OSX</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15207/nrfutil-on-osx</link><description>Hi all, 
 I&amp;#39;m on 10.11.1 (El Capitan), followed the instructions here 
 github.com/.../pc-nrfutil 
 And it looks like installed was happy but when I try and run nrfutil it crashes immediately 
 nrfutil --help
Fatal Python error: PyThreadState_Get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Jun 2017 08:45:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15207/nrfutil-on-osx" /><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58072?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2017 08:45:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:058d82ee-67c1-4bbb-b3b7-5e4b3df75fa6</guid><dc:creator>Jagor</dc:creator><description>&lt;p&gt;If you have non-system python installed (via brew or macports) you can try suggestion from &lt;a href="https://github.com/metacollin/homebrew-gnuradio/issues/47#issuecomment-134437742"&gt;github.com/.../47&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;here are commands that fixed that for me&lt;/p&gt;
&lt;p&gt;after &lt;code&gt;pip install pc_ble_driver_py&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I ran&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib /usr/local/lib/python2.7/site-packages/pc_ble_driver_py/lib/macos_osx/_pc_ble_driver_sd_api_v3.so

sudo install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib /usr/local/lib/python2.7/site-packages/pc_ble_driver_py/lib/macos_osx/_pc_ble_driver_sd_api_v2.so
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58071?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 23:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02715b42-0c4b-4f6c-a93f-54202f3aa273</guid><dc:creator>shadowsky</dc:creator><description>&lt;p&gt;I tried the same installation on my Mac 10.12 (Sierra), and I get exactly the same issue.&lt;/p&gt;
&lt;p&gt;Did you manage to fix the problem?&lt;/p&gt;
&lt;p&gt;Edit:
I finally try to use an older version &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/releases/tag/v0.5.1"&gt;0.5.1&lt;/a&gt; from the github and it seems to works correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58070?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 06:45:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc0e07c1-72bb-47ce-a5a1-f17c4dfee74a</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;For some reason py2exe did not work out of the box for me, so I had to manually install it by following instructions from &lt;a href="http://www.py2exe.org/."&gt;http://www.py2exe.org/.&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58069?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 06:36:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de4958a8-00d7-448e-a793-267d7c4a7b86</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Since OS X comes installed with python default, it will have it in the path by default as well. This means that if you update python you also need to make sure that the path updates. To find out which version of python is in the path you can run python -V.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been looking a bit more into this, bear with me, this is going to be a little &amp;quot;hacky&amp;quot;. Note I am still not sure why this fails for you, but this workaround should work.&lt;/p&gt;
&lt;p&gt;First off we will download the 0.5 branch of nrfutil (Turns out that the live branch is for a future SDK 12) &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/archive/0_5_1.zip"&gt;direct link to zip here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After unzipping we need to install it, first we need to fix the dependencies, opening the requirements.txt file we find that we need to install the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pip install pyserial
pip install enum34
pip install click
pip install ecdsa
pip install behave
pip install py2exe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After installing the dependencies you should be able to run the installer from the unzip location, eg. &amp;quot;[MY UNZIP LOCATION]\pc-nrfutil-0_5_1&amp;quot;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python setup.py install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The neat trick here is that the python script will run &amp;quot;uncompiled&amp;quot; so we can run main without wrappers, navigate to the nordicsemi folder and run &lt;strong&gt;main&lt;/strong&gt;.py&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd nordicsemi\
python __main__.py
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For all intents and purposes this main.py is the same as nrfutil.&lt;/p&gt;
&lt;p&gt;Let me know if this works, or you find a better solution.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58068?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 02:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:344c921e-8103-4a73-ac2f-8086b0c798a4</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Nope, still not working. I upgraded OSX to latest and upgrade Python to 2.7.10 and it still fails..&lt;/p&gt;
&lt;p&gt;Very frustrating as I can&amp;#39;t make a release without going to a Windows machine..&lt;/p&gt;
&lt;p&gt;Exactly same problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58067?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 11:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33e25f98-aed4-4ee7-8f4d-eab55fb81ba3</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Searching around for the error code gives a lot of references to the python version being the issue, I&amp;#39;d recommend trying an update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58066?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 10:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:019c2aa1-03bc-47c5-b556-b6162aa25d23</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Yeah, I get the feeling thats the version thats installed with the OS but it should be modern enough..&lt;/p&gt;
&lt;p&gt;I have&lt;/p&gt;
&lt;p&gt;Chriss-MacBook-Pro:Downloads christopher$ pip -V
pip 8.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58065?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 10:30:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8943de88-74b2-44fa-853a-f6e41a7a4123</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Seems that we&amp;#39;re using different python versions, it&amp;#39;s just a shot in the dark, but perhaps updating Python will do it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58064?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 10:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fa8fa11-1b5b-4cf6-adef-34951feca6ed</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Nope, re-ran and still no success.. I can upgrade my OSX but don&amp;#39;t think thats it..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58063?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 10:19:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44dd1f71-b83e-4b58-96f3-50fbcafd899f</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Yep, I had tested and made sure I was on 2.7.9 ..&lt;/p&gt;
&lt;p&gt;I also made sure I installed pip&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll run through the rest..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58062?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 08:47:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49f3da43-1c92-4ef2-86db-c864c1a19d89</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Oh, make sure that you are running python 2.7, to find out which version you are running type python -V in the terminal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfutil on OSX</title><link>https://devzone.nordicsemi.com/thread/58061?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 08:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c52dbf78-20a4-4488-8c77-d42a50336af1</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tried this just now on a 10.11.4 OS X Mactop using Python 2.7.10.&lt;/p&gt;
&lt;p&gt;On my Mac I had to install pip as it was not installed, the pipinstaller also installs setup tools for me. I followed the instructions on &lt;a href="https://pip.pypa.io/en/stable/installing/"&gt;this link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then I installed nrfutil by using pip install nrfutil.&lt;/p&gt;
&lt;p&gt;I had to sudo when installing pip and also when installing nrfutil, probably because of a local setting.&lt;/p&gt;
&lt;p&gt;As a side note, I&amp;#39;ve found that whenever you are able to install anything using pip it will make your life infinitely easier. Simply put pip fixes the problems that I usually make for myself when installing tools, wrong paths etc.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>