Building blender - install_deps - "no module named setuptools", while building Numpy


I’m hoping someone can help me. I’m trying to build Blender on a fresh install of Fedora 28. Unfortunately I’m stuck at the stage. It gets as far as Numpy, and then I get this:

ModuleNotFoundError: No module named 'setuptools'
ERROR! Numpy-1.15.0 failed to compile, exiting

I’m trying to build the master branch. It looks like it’s trying to use the newly built Python 3.7 to build numpy, and failing because that doesn’t seem to include setuptools.

I’d appreciate any help anyone can give me; please ask if you need any more information.



Installing a python-setuptools package may solve the issue?

@mont29, guess we need some tweak to

What would be interesting is finding why it needs to build numpy? I’d expect fedora 28’s 1.14 python3-numpy package to be used, since we only require >= 1.8…

@mont29 it looks like it builds numpy because it’s built Python (which it builds because Fedora 28 has Python 3.6.6):

  if [ "$_do_compile_python" = true ]; then
    PRINT ""
    if [ "$NUMPY_SKIP" = true ]; then
      WARNING "Skipping NumPy installation, as requested..."

What’s interesting is that checking out b07d866cf6d206 (the commit before the libraries were updated), and forcing a build of Python 3.6.2 works. The output of the Python build includes this:

Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.1 setuptools-28.8.0

The output of the 3.7 build looks like it tries to run the ensurepip, which I’m guess might provide setuptools as well as pip, and fails with:

ModuleNotFoundError: No module named '_ctypes'

Ok, looks like is the problem. Installing libffi-devel does the trick, so I guess that’s now a dependency if you want to force a Python build on Fedora, and certainly until Fedora update to 3.7.

Thanks for the pointer @mont29.


Thanks, updated install_deps to install that package when building python now. :slight_smile:


Same issue here, but isn’t installing libffi-devel. I put some debug text in at line 3475 and it reaches that point, but doesn’t output any error or a sudo prompt. (running script as a normal user)

If I manually install libffi then all is good.

openSUSE Leap 15.0, x86_64