Beware macOS 11.0 Big Sur and python3.9

96 views
Skip to first unread message

Chris Alemany

unread,
Dec 2, 2020, 3:14:47 PM12/2/20
to weewx-user
Hello all,

I just spent an hour re-activating my weewx install and a couple other services after I ran brew upgrade and it updated ffmpeg and some other utilities requiring python 3.9.

It turns out a host of pip modules, including Cheetah3 and pyephem, don’t build under 3.9 of pip quite yet. (Complaining of int -> str errors)

So I had to make sure the modules were available to the 3.8 version and then run weewx specifically with that version rather than with the generic python3 command.

A bit of an unexpected headache but such is life. Hopefully this message warns others.. and hopefully in time the modules will come along in 3.9

Cheers
Chris

vince

unread,
Dec 2, 2020, 3:18:43 PM12/2/20
to weewx-user
anybody gutsy enough to try weewx on the new M1 chip os ?

geoffs...@gmail.com

unread,
Dec 18, 2020, 2:35:00 AM12/18/20
to weewx-user
yes. 

Looks like python 3.8.2 and whew will build. Has this problem when you try to generate html files

weewx[5185] INFO __main__: Initializing weewx version 4.2.0
weewx[5185] INFO __main__: Using Python 3.8.2 (default, Oct  2 2020, 10:45:41) 
[Clang 12.0.0 (clang-1200.0.32.27)]
weewx[5185] INFO __main__: Platform macOS-11.0.1-arm64-arm-64bit
weewx[5185] INFO __main__: Locale is 'C/UTF-8/C/C/C/C'
weewx[5185] INFO __main__: Using configuration file /Users/Shared/weewx/weewx.conf
weewx[5185] INFO __main__: Debug is 0
weewx[5185] INFO weewx.engine: Loading station type Simulator (weewx.drivers.simulator)
weewx[5185] INFO weewx.engine: StdConvert target unit is 0x1
weewx[5185] INFO weewx.engine: Archive will use data binding wx_binding
weewx[5185] INFO weewx.engine: Record generation will be attempted in 'hardware'
weewx[5185] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
weewx[5185] INFO weewx.restx: StationRegistry: Registration not requested.
weewx[5185] INFO weewx.restx: Wunderground: Posting not enabled.
weewx[5185] INFO weewx.restx: PWSweather: Posting not enabled.
weewx[5185] INFO weewx.restx: CWOP: Posting not enabled.
weewx[5185] INFO weewx.restx: WOW: Posting not enabled.
weewx[5185] INFO weewx.restx: AWEKAS: Posting not enabled.
weewx[5185] INFO __main__: Starting up weewx version 4.2.0
weewx[5185] INFO weewx.engine: Clock error is -0.01 seconds (positive is fast)
weewx[5185] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
weewx[5185] INFO weewx.manager: Starting backfill of daily summaries
weewx[5185] INFO weewx.engine: Starting main packet loop.
wee_reports[5189] INFO weewx.engine: StdConvert target unit is 0x1
wee_reports[5189] INFO weewx.engine: Archive will use data binding wx_binding
wee_reports[5189] INFO weewx.engine: Record generation will be attempted in 'hardware'
wee_reports[5189] INFO weewx.engine: Using archive interval of 300 seconds (specified by hardware)
wee_reports[5189] INFO weewx.restx: StationRegistry: Registration not requested.
wee_reports[5189] INFO weewx.restx: Wunderground: Posting not enabled.
wee_reports[5189] INFO weewx.restx: PWSweather: Posting not enabled.
wee_reports[5189] INFO weewx.restx: CWOP: Posting not enabled.
wee_reports[5189] INFO weewx.restx: WOW: Posting not enabled.
wee_reports[5189] INFO weewx.restx: AWEKAS: Posting not enabled.
wee_reports[5189] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 0.36 seconds
wee_reports[5189] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.imagegenerator.ImageGenerator'
wee_reports[5189] ERROR weewx.reportengine:         ****  The _imagingft C module is not installed
wee_reports[5189] ERROR weewx.reportengine:         ****  Traceback (most recent call last):

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Users/Shared/weewx/bin/weewx/reportengine.py", line 196, in run

wee_reports[5189] ERROR weewx.reportengine:         ****      obj.start()

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Users/Shared/weewx/bin/weewx/reportengine.py", line 281, in start

wee_reports[5189] ERROR weewx.reportengine:         ****      self.run()

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Users/Shared/weewx/bin/weewx/imagegenerator.py", line 41, in run

wee_reports[5189] ERROR weewx.reportengine:         ****      self.genImages(self.gen_ts)

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Users/Shared/weewx/bin/weewx/imagegenerator.py", line 263, in genImages

wee_reports[5189] ERROR weewx.reportengine:         ****      image = plot.render()

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Users/Shared/weewx/bin/weeplot/genplot.py", line 206, in render

wee_reports[5189] ERROR weewx.reportengine:         ****      self._renderBottom(draw)

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Users/Shared/weewx/bin/weeplot/genplot.py", line 386, in _renderBottom

wee_reports[5189] ERROR weewx.reportengine:         ****      bottom_label_font = weeplot.utilities.get_font_handle(self.bottom_label_font_path, self.bottom_label_font_size)

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Users/Shared/weewx/bin/weeplot/utilities.py", line 562, in get_font_handle

wee_reports[5189] ERROR weewx.reportengine:         ****      font = ImageFont.truetype(fontpath_str, *args)

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Library/Python/3.8/site-packages/PIL/ImageFont.py", line 836, in truetype

wee_reports[5189] ERROR weewx.reportengine:         ****      return freetype(font)

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Library/Python/3.8/site-packages/PIL/ImageFont.py", line 833, in freetype

wee_reports[5189] ERROR weewx.reportengine:         ****      return FreeTypeFont(font, size, index, encoding, layout_engine)

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Library/Python/3.8/site-packages/PIL/ImageFont.py", line 169, in __init__

wee_reports[5189] ERROR weewx.reportengine:         ****      if core.HAVE_RAQM:

wee_reports[5189] ERROR weewx.reportengine:         ****    File "/Library/Python/3.8/site-packages/PIL/ImageFont.py", line 43, in __getattr__

wee_reports[5189] ERROR weewx.reportengine:         ****      raise ImportError("The _imagingft C module is not installed")

wee_reports[5189] ERROR weewx.reportengine:         ****  ImportError: The _imagingft C module is not installed

wee_reports[5189] ERROR weewx.reportengine:         ****  Generator terminated
wee_reports[5189] INFO weewx.reportengine: Copied 5 files to /Users/Shared/weewx/public_html


Looks to be an issue with Pillow?

geoffs...@gmail.com

unread,
Dec 19, 2020, 3:55:40 PM12/19/20
to weewx-user
Can be done. Will not run using launchctl as it tries to run as ARM64 rather than x86 under python 3.8.2. If manually started as a daemon, it does work. Everything needed to be installed and run using a version of the terminal that was set to Rosetta. Go to info on the Terminal app and tick Rosetta box. Needed to install both libjpeg and freetype from source before I could get a working PIL. This was a total PITA and still can't be run at startup without some sort of script. That being said, it does "work". Everything I tried to get a native ARM64 version failed with regard to getting a working PIL. It doesn't seem to be able to make a working library that allow Image to be imported from PIL.  

Reply all
Reply to author
Forward
0 new messages