[MacPorts] #59466: python27: ImportError: No module named _collections

MacPorts noreply at macports.org
Fri Nov 8 01:06:32 UTC 2019


#59466: python27: ImportError: No module named _collections
-----------------------+----------------------
  Reporter:  rmottola  |      Owner:  jmroot
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:  leopard
      Port:  python27  |
-----------------------+----------------------

Comment (by rmottola):

 the issue... is worse. I uninstalled all python versions, install cmake
 and first python gets pulled in, built and installed (and has fine shared
 objects) then it does the same process again, but in +universal (it is a
 64bit machine and I enabled that) and now the modules are broken.
 When I did the test you asked, I did not add +universal...

 now, scrolling back in the console I see messages like this:


 {{{
 building '_sha256' extension
 /usr/bin/gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -pipe -Os
 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python27/python27/work/Python-2.7.17/Mac/Include
 -I. -IInclude -I./Include -I/opt/local/include -I/opt/local/include/db48
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python27/python27/work/Python-2.7.17/Include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python27/python27/work/Python-2.7.17
 -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python27/python27/work/Python-2.7.17/Modules/sha256module.c
 -o
 build/temp.macosx-10.5-x86_64-2.7/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python27/python27/work/Python-2.7.17/Modules/sha256module.o
 /usr/bin/gcc-4.2 -bundle -undefined dynamic_lookup -L/opt/local/lib
 -Wl,-headerpad_max_install_names -L/opt/local/lib/db48
 build/temp.macosx-10.5-x86_64-2.7/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python27/python27/work/Python-2.7.17/Modules/sha256module.o
 -L/opt/local/lib -L/opt/local/lib/db48 -o
 build/lib.macosx-10.5-x86_64-2.7/_sha256.so
 *** WARNING: renaming "_sha256" since importing it failed:
 dlopen(build/lib.macosx-10.5-x86_64-2.7/_sha256.so, 2): no suitable image
 found.  Did find:
         build/lib.macosx-10.5-x86_64-2.7/_sha256.so: mach-o, but wrong
 architecture
 }}}

 and this is repeated the same for every .so

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


More information about the macports-tickets mailing list