Search code examples
distutilsopenwrt

Distutils.core could not be found, where can I download it


Traceback (most recent call last):
  File "setup.py", line 26, in <module>
    from distutils.core import setup, Extension, Command
ImportError: No module named distutils.core

I get this error when installing ctypes.py on openwrt. Unfortunately, I cannot find the download link to the setup for distutils.core.

Can someone point me to it?


Solution

  • distutils ships in Python’s standard libary. Some operating systems think it’s not a regular module but only interesting for developers, so they move it to a python-devel package together with C headers, config files and co. https://dev.openwrt.org/ticket/793 tells me that this is the case for OpenWRT: you need to install python-dev to get distutils installed.