Opened 6 months ago

Last modified 6 months ago

#70136 new defect

ImportError for pyexpat with python 3.8

Reported by: aarongeller Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: python38

Description

After upgrading my python 3.8, trying to run from pyexpat import * gives:

ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/pyexpat.cpython-38-darwin.so, 0x0002): Symbol not found: _XML_SetReparseDeferralEnabled`

  `Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/pyexpat.cpython-38-darwin.so`

  `Expected in: /Applications/MATLAB/MATLAB_Runtime/R2023a/bin/maci64/libexpat.1.8.7.dylib`

I was able to fix this by restoring the old version of /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/pyexpat.cpython-38-darwin.so.

Change History (1)

comment:1 Changed 6 months ago by jmroot (Joshua Root)

Port: python38 added

Did you install from a binary or from source? Is pyexpat.cpython-38-darwin.so actually linked against your MATLAB installation or could a DYLD_* environment variable be set?

In the Sonoma x86_64 binary:

% otool -L python38-3.8.19_0+optimizations.darwin_23.x86_64/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/pyexpat.cpython-38-darwin.so
python38-3.8.19_0+optimizations.darwin_23.x86_64/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/pyexpat.cpython-38-darwin.so:
	/opt/local/lib/libexpat.1.dylib (compatibility version 11.0.0, current version 11.2.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.61.1)
Note: See TracTickets for help on using tickets.