[MacPorts] #63782: python3{8, 9, 10} +universal: ImportError: dynamic module does not define module export function (PyInit__posixsubprocess)

MacPorts noreply at macports.org
Sat Dec 18 00:48:11 UTC 2021


#63782: python3{8,9,10} +universal: ImportError: dynamic module does not define
module export function (PyInit__posixsubprocess)
------------------------------------------+----------------------------
  Reporter:  casr                         |      Owner:  (none)
      Type:  defect                       |     Status:  new
  Priority:  Normal                       |  Milestone:
 Component:  ports                        |    Version:
Resolution:                               |   Keywords:  monterey arm64
      Port:  python38 python39 python310  |
------------------------------------------+----------------------------

Comment (by ryankanno):

 Replying to [comment:13 jmroot]:
 > Thanks. Note that the ModuleNotFoundError is not relevant; `msvcrt` only
 exists on Windows, so the `subprocess` module catches that error and
 imports `_posixsubprocess` instead, which is where the actual failure
 happens.

 Gotcha - makes sense. As a note, these results above are the opposite of
 what I saw in my original ticket [#64234]. To verify the original ticket
 and for my own sanity, I ran the following:

 ||= Installation command =||= Output of `port -vq installed python39` =||=
 Arch =||= Command =||= Result =||
 || `$ port install python39 +universal` || python39
 @3.9.9_0+lto+optimizations+universal (active)
 requested_variants='+universal' platform='darwin 21' archs='arm64 x86_64'
 date='2021-12-18T09:38:51+0900' || x86_64 || `arch -x86_64
 /opt/local/bin/python3.9 -c 'import subprocess;'` || ImportError: dynamic
 module does not define module export function (PyInit__posixsubprocess) ||
 || `$ port install python39 +universal` ||   python39
 @3.9.9_0+lto+optimizations+universal (active)
 requested_variants='+universal' platform='darwin 21' archs='arm64 x86_64'
 date='2021-12-18T09:38:51+0900' || arm64  || `arch -arm64
 /opt/local/bin/python3.9 -c 'import subprocess;'` || success ||

 For the sys.path, here is the path(s) from the python above:

 `arch -x86_64 /opt/local/bin/python3.9 -c 'import sys; print(sys.path)'`

 {{{#!bash
 ['',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python39.zip',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /lib-dynload',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages']
 }}}

 `arch -arm64 /opt/local/bin/python3.9 -c 'import sys; print(sys.path)'`

 {{{#!bash
 ['',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python39.zip',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /lib-dynload',
 '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages']
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/63782#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list