Compile Error - NRF52 Feather - Newbie

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
zambam
 
Posts: 6
Joined: Sun Apr 15, 2018 4:51 pm

Compile Error - NRF52 Feather - Newbie

Post by zambam »

Hi All,

Just want to start out by saying that I am new to arduino setup and this is my first board setup.

Current setup:
Mac OSX 10.12.6
Arduino 1.8.5 Desktop Client
NRF52 Feather 0.6.0 (I've tried the latest version 0.8.3 but the same results)

I've followed the setup instructions in:
https://learn.adafruit.com/bluefruit-nr ... linux-only

And i have completed the steps with successful results:

Code: Select all

Requirement already satisfied: pyserial>=2.7 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 1)) (3.4)
Requirement already satisfied: enum34>=1.0.4 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 2)) (1.1.6)
Requirement already satisfied: click==5.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 3)) (5.1)
Requirement already satisfied: ecdsa>=0.13 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 4)) (0.13)
Requirement already satisfied: behave in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 5)) (1.2.6)
Requirement already satisfied: parse>=1.8.2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from behave->-r requirements.txt (line 5)) (1.8.2)
Requirement already satisfied: parse-type>=0.4.2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from behave->-r requirements.txt (line 5)) (0.4.2)
Requirement already satisfied: six>=1.11 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from behave->-r requirements.txt (line 5)) (1.11.0)
Requirement already satisfied: traceback2; python_version < "3.0" in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from behave->-r requirements.txt (line 5)) (1.4.0)
Requirement already satisfied: linecache2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from traceback2; python_version < "3.0"->behave->-r requirements.txt (line 5)) (1.0.0)

Code: Select all

Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nrfutil-0.5.2-py2.7.egg
Processing dependencies for nrfutil==0.5.2
Finished processing dependencies for nrfutil==0.5.2

When I try to compile any example sketch, I receive the following:

Code: Select all

Arduino: 1.8.5 (Mac OS X), Board: "Adafruit Bluefruit nRF52 Feather, Level 0 (Release)"

Traceback (most recent call last):
  File "/usr/local/bin/nrfutil", line 9, in <module>
    load_entry_point('nrfutil==0.5.2', 'console_scripts', 'nrfutil')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load
    return self.resolve()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Python/2.7/site-packages/nrfutil-0.5.2-py2.7.egg/nordicsemi/__main__.py", line 32, in <module>
    import click
ImportError: No module named click
exit status 1
Error compiling for board Adafruit Bluefruit nRF52 Feather.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Any help would be great, thanks.

User avatar
luthier42
 
Posts: 14
Joined: Mon Sep 04, 2017 10:22 am

Re: Compile Error - NRF52 Feather - Newbie

Post by luthier42 »

Any luck on this? I'm having the same issue.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compile Error - NRF52 Feather - Newbie

Post by adafruit_support_mike »

Try opening Terminal and entering the following command:

Code: Select all

sudo pip install click
What output do you get?

User avatar
luthier42
 
Posts: 14
Joined: Mon Sep 04, 2017 10:22 am

Re: Compile Error - NRF52 Feather - Newbie

Post by luthier42 »

The directory '/Users/jayne/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/jayne/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: click in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (6.7)

User avatar
luthier42
 
Posts: 14
Joined: Mon Sep 04, 2017 10:22 am

Re: Compile Error - NRF52 Feather - Newbie

Post by luthier42 »

As far as I can tell from my research, there are now two versions of Python 2.7 on my system. The one OSX comes with that the system uses is in /System/Library while the one that is installed as part of the setup for this boar is in /Library. It looks like the compiler keeps referencing the /System/Library install which seems to me not a good idea and is not a full blown version of Python. All the added tools and things that were part of the setup document were applied to the /Library version. I was able to put a copy of the click module in the /System/Library version and I'm now getting a different error.

Arduino: 1.8.2 (Mac OS X), TD: 1.39, Board: "Adafruit Bluefruit nRF52 Feather, 5.1.0 dual, S132 5.1.0, Level 0 (Release)"

WARNING: Category 'Audio' in library Mozzi is not valid. Setting to 'Uncategorized'
Traceback (most recent call last):
File "/usr/local/bin/nrfutil", line 9, in <module>
load_entry_point('nrfutil==0.5.2', 'console_scripts', 'nrfutil')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load
return self.resolve()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Library/Python/2.7/site-packages/nrfutil-0.5.2-py2.7.egg/nordicsemi/__main__.py", line 36, in <module>
from nordicsemi.dfu.dfu_transport_serial import DfuTransportSerial
File "/Library/Python/2.7/site-packages/nrfutil-0.5.2-py2.7.egg/nordicsemi/dfu/dfu_transport_serial.py", line 37, in <module>
from serial import Serial
File "/Library/Python/2.7/site-packages/nrfutil-0.5.2-py2.7.egg/nordicsemi/dfu/serial/__init__.py", line 13, in <module>
from serial.serialutil import *
ImportError: No module named serial.serialutil
exit status 1
Error compiling for board Adafruit Bluefruit nRF52 Feather.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


I'm not sure where to find that module and it's probably not a good idea to keep putting stuff in the /System/Library version anyway. I'm going to restore that file from a previous backup and uninstall the Python version I added per the boards documentation. I may try installing it again, but and advice on this would be great.

User avatar
zambam
 
Posts: 6
Joined: Sun Apr 15, 2018 4:51 pm

Re: Compile Error - NRF52 Feather - Newbie

Post by zambam »

Here's the output:

Code: Select all

sudo pip install click
The directory '/Users/Z*/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Z*/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: click in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (5.1)
adafruit_support_mike wrote:Try opening Terminal and entering the following command:

Code: Select all

sudo pip install click
What output do you get?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compile Error - NRF52 Feather - Newbie

Post by adafruit_support_mike »

That looks like there's a filepath problem somewhere in the system. The Python interpreter has the correct module, but the code trying to build nrfutil can't find it.

There may be a compatibility issue with the version of OS X you're using. Take a look at this thread and see if the information there helps:

viewtopic.php?f=57&t=120439&p=601707

User avatar
luthier42
 
Posts: 14
Joined: Mon Sep 04, 2017 10:22 am

Re: Compile Error - NRF52 Feather - Newbie

Post by luthier42 »

I'm a super novice at terminal stuff and I've never dealt with python. I'm only vaguely familiar with the concept of home brew. It looks to me like in order to get this thing to work there's a ton of extra steps involved and it's going to take me quite a while to learn what I need to in order to figure it all out. This thread you pointed me to is almost a year old. Can you guys maybe consider rewriting the install manual for OSX? The last guy on that thread said he had to use the home brew version of python, a concept I first read about after spending an hour searching for a resolution to this. Please have someone with High Sierra look into this and write it up. What a nightmare.

User avatar
zambam
 
Posts: 6
Joined: Sun Apr 15, 2018 4:51 pm

Re: Compile Error - NRF52 Feather - Newbie

Post by zambam »

I've switched to a Windows PC and it works without issues. I'll probably stick to Windows...less complications. Perhaps when I become mroe familar, I'll flip back to my Mac.

Thanks for your help, hopefully this helps others!
adafruit_support_mike wrote:That looks like there's a filepath problem somewhere in the system. The Python interpreter has the correct module, but the code trying to build nrfutil can't find it.

There may be a compatibility issue with the version of OS X you're using. Take a look at this thread and see if the information there helps:

viewtopic.php?f=57&t=120439&p=601707

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Compile Error - NRF52 Feather - Newbie

Post by adafruit_support_mike »

If that's a comfortable solution for you, go for it. The nRF52 is a moderately advanced board, so the setup is geared for people who are comfortable digging around in the guts of a system.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”