Installation Error: Could not build wheels for stardist which use PEP 517 and cannot be installed directly


I am new to Star Dist (and new to bioinformatics, unfortunately) and have already failed to install Star Dist via the CC=gcc-9 CXX=g+±9 pip install stardist command.

The Error output is attached and basically tells me that the wheels for stardust can’t be build. It seems to rely on PEP 517 - I have already read that there are certain programs that can’t install via pip for that reason, but this should not be a problem in this case - right?

I have followed the instructions on thoroughly and should have all the prerequisites installed.

Any solutions? Thank you so much!
Thiemo Moellenkamp

MD_StarDist_TerminalOutput_Error_03082020.pdf (25.4 KB)

Hi @TMM-98,

PEP 517 only works with recent (>=19.0) versions of pip ( Is you pip up-to-date? You can check with pip --version. If it isn’t you can update things with pip install --upgrade pip setuptools wheel. Also, it looks like you don’t use any specific environment for your installation. I strongly encourage you to use e.g. a conda environment to do the installation.


Hi @TMM-98, @guiwitz,

The installation error was most likely caused by a missing gcc compiler.
E.g. when running

CC=gcc-9 CXX=g++-9 pip install stardist

without gcc-9 being installed, pip/python will throw the error above. Its a bit hidden (exit status 127 means “command not found”) and has nothing to do with PEP 517. The same error would appear when doing CC=FOOBAR pip install stardist). So all a bit confusing and clearly not an optimal error message provided by pip :wink: