Python Forum
ImportError: cannot import name 'Union' from '_ctypes' (unknown location)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ImportError: cannot import name 'Union' from '_ctypes' (unknown location)
#14
sorry Larz but I don't understand

first I have a configure error (solved) and a compiler error (still to solve)

root@crbosrv2:/presidio_sun/SUNFREEWARE/python/Python-3.8.5$ ./configure
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for python3.8... python3.8
....
checking whether float word ordering is bigendian... unknown
configure: error:
Unknown float word ordering. You need to manually preset
ax_cv_c_float_words_bigendian=no (or yes) according to your system.

This first problem has been solved with:

find /usr -name ggrep
/usr/sfw/bin/ggrep
PATH=$PATH:/usr/sfw/bin
export PATH

root@crbosrv2:/presidio_sun/SUNFREEWARE/python/Python-3.8.5$ ./configure
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
....
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
config.status: pyconfig.h is unchanged
creating Modules/Setup.local
creating Makefile

root@crbosrv2:/presidio_sun/SUNFREEWARE/python/Python-3.8.5$ make
gcc -c -fno-strict-aliasing -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -D_REENTRANT -std=c99 -Wextra -Wno-unused-parameter -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
......
INFO: Could not locate ffi libs and/or headers
*** WARNING: renaming "_curses" since importing it failed: ld.so.1: python: fatal: relocation error: file build/lib.solaris-2.10-sun4u.32bit-3.8/_curses.so: symbol _unctrl: referenced symbol not found
*** WARNING: renaming "_curses_panel" since importing it failed: No module named '_curses'

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_gdbm _lzma ossaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc atexit pwd
time


Failed to build these modules:
_ctypes


Following modules built successfully but were removed because they could not be imported:
_curses _curses_panel

running build_scripts
Reply


Messages In This Thread
RE: ImportError: cannot import name 'Union' from '_ctypes' (unknown location) - by ciuffoly - Sep-24-2020, 01:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Cannot import easysnmp: ImportError: libnetsnmp.so.30 Calab 4 1,310 Jun-08-2023, 08:52 PM
Last Post: Gribouillis
  ImportError: cannot import name 'Pyfhel' from 'Pyfhel' Anldra12 9 3,867 Dec-13-2021, 06:55 PM
Last Post: Anldra12
  ImportError: cannot import name 'get_config' russray2008 0 4,931 Sep-20-2021, 02:18 PM
Last Post: russray2008
  Inheritance vs Union gserranowong 3 2,457 Jun-29-2021, 06:13 PM
Last Post: gserranowong
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 4,085 Jun-18-2020, 08:07 AM
Last Post: buran
  ImportError: cannot import name 'MidiEvaluator' from 'parser' (Windows 10) spiffspaceman 4 2,861 May-22-2020, 10:16 PM
Last Post: snippsat
  ImportError: cannot import name 'X ' from ' Y' (Unknown location) Arjunpi 1 4,533 Apr-30-2020, 12:56 AM
Last Post: Larz60+
  Lists union and intersecion arbiel 5 3,056 Mar-28-2020, 05:57 AM
Last Post: buran
  Where could I get _ctypes module except libffi-dev? Snake 7 8,564 Jan-17-2020, 11:10 AM
Last Post: Larz60+
  problem with mapnik in anaconda python 2: from _mapnik import * ImportError: DLL load parsley 0 2,005 Dec-11-2019, 07:50 AM
Last Post: parsley

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020