[MacPorts] #63782: python3{8, 9, 10} +universal: ImportError: dynamic module does not define module export function (PyInit__posixsubprocess)
MacPorts
noreply at macports.org
Fri Dec 24 08:54:37 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:23 jmroot]:
> You would edit the Portfile and add that flag to configure.args, and
then install the port with `sudo port -s install python39 +universal` (or
whichever python version). Or if it's already installed, `sudo port -ns
upgrade --force python39 +universal` will force a rebuild.
Here is what I did, let me know if there's anything else you'd like me to
try.
Edited the Portfile as follows:
{{{#!bash
diff --git i/lang/python39/Portfile w/lang/python39/Portfile
index fc4f95fb92e..85387f02849 100644
--- i/lang/python39/Portfile
+++ w/lang/python39/Portfile
@@ -66,7 +66,8 @@ configure.args --enable-framework=${frameworks_dir}
\
--with-computed-gotos \
--with-ensurepip=no \
--with-system-expat \
- --with-system-ffi
+ --with-system-ffi \
+ --with-universal-archs=universal2
}}}
Ran `sudo port uninstall python39` to be safe, cd into the folder with the
modified Portfile above and ran
`sudo port -s install +universal`, but unfortunately still see failures w/
arm64
{{{#!bash
$ arch -x86_64 /opt/local/bin/python3.9
Python 3.9.9 (main, Dec 24 2021, 16:53:51)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> ^D
$ arch -arm64 /opt/local/bin/python3.9
Python 3.9.9 (main, Dec 24 2021, 16:53:51)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
Traceback (most recent call last):
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py",
line 73, in <module>
import msvcrt
ModuleNotFoundError: No module named 'msvcrt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py",
line 78, in <module>
import _posixsubprocess
ImportError: dynamic module does not define module export function
(PyInit__posixsubprocess)
>>>
}}}
--
Ticket URL: <https://trac.macports.org/ticket/63782#comment:24>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list