Build of weewx on M1 Mac

81 views
Skip to first unread message

geoffs...@gmail.com

unread,
Dec 21, 2020, 7:48:44 PM12/21/20
to weewx-user
Setup pyenv using Homebrew M1 experimental version and then installed python 3.9.1
Then installed all necessary libraries. Needed to use homebrew to install FreeType and libjpeg to get a working Pillow install.

can be started as a daemon using 

cd /Users/Shared/weewx
python3 ./bin/weewxd weewx.conf -d
Runs as native on M1 ARM64 arch
weewx[1269] INFO __main__: Initializing weewx version 4.2.0
weewx[1269] INFO __main__: Using Python 3.9.1 (default, Dec 21 2020, 07:33:29) 
[Clang 12.0.0 (clang-1200.0.32.28)]
weewx[1269] INFO __main__: Platform macOS-11.1-arm64-arm-64bit
weewx[1269] INFO __main__: Locale is 'en_US.UTF-8'
weewx[1269] INFO __main__: PID file is /var/run/weewx.pid
weewx[1288] INFO __main__: Using configuration file weewx.conf
weewx[1288] INFO __main__: Debug is 0

 
Still will not start from launchctl
get:

Dec 21 10:58:10 Mac-mini com.apple.xpc.launchd[1] (com.weewx.weewxd[893]): Service could not initialize: 20C69: xpcproxy + 23696 [839][D05D0576-CE1E-3530-B74C-0EB266FFBFDD]: 0x2

Dec 21 10:58:10 Mac-mini com.apple.xpc.launchd[1] (com.weewx.weewxd[893]): Service exited with abnormal code: 78

Any ideas on how to set up launchctl start to work?

Chris Alemany

unread,
Dec 22, 2020, 6:38:31 PM12/22/20
to weewx-user
I have not been able to convince MacOS 11.1 to allow me to use launchctl for weewx either and I am on an Intel machine.
I'll keep trying on my end.  Did you have any trouble getting all the requirements for weewx included in python 3.9.1? I got stuck part way through and had to go back to 3.8.6

Cheers
Chris

geoffs...@gmail.com

unread,
Dec 23, 2020, 4:06:47 PM12/23/20
to weewx-user
Hi Chris,

I had a problem with the python install as I had the system install, the python installer version and a Pyenv version. I got rid of the python installer version and killed all of the symlinks in the /usr/local/ folder and then installed Pyenv to install 3.9.1. I then set Pyenv global to 3.9.1 and was able to get python3 -V to spit out 3.9.1 and /usr/bin/env python to open 3.9.1. This was the key. When I built weewx, it at first had the shebang in the file pointing to the python installed by the python installer. This is why if I started it from Terminal it worked fine, but using Launchctl, it was looking for a python install that didn't exist. Look at the #! first line of weewxd to make sure it points to an accessible python 3.9.1 location. Since I had build weewx several times, I didn't realize that a script was made for each build and it was just reinstalling that script each time rather than looking for the updated python and making a new pointer to the updated python. If you get rid of the weewx-4.2.0 folder and unzip it again, you will get rid of the versions that it has already made. Hope this helps. Finally got it to work as it should once the !# in all of the weewx files pointed to the correct python install. It looks like weewx uses /usr/bin/env python to determine what to write in the files, so if you do /usr/bin/env python in the terminal it should open the 3.9.1 version of python. If not, you need to get that working before running a fresh setup.py install. Hope this helps.

Christopher Joseph Alemany

unread,
Dec 23, 2020, 6:10:08 PM12/23/20
to weewx...@googlegroups.com
Ah! That makes sense! It felt like it all was coming down to different python versions. What a mess python has become! I will endeavour to clean it up as you suggest. Thanks for the pointers!

“They always tell me it takes time. How much more time do you want...for your progress?”
James Baldwin

Chris Alemany
V9Y4M2

On Dec 23, 2020, at 08:06, geoffs...@gmail.com <geoffs...@gmail.com> wrote:

Hi Chris,
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c8d36687-35c4-4fc3-9c15-cdf2bfe5af26n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages