Resolved installation issue with Mac OSX 10.12 -- gcc/psutil

I just wanted to post an issue I’ve resolved with installing deeplabcut, in case anyone else has a similar problem. Following the installation with anaconda instructions, I used miniconda/downloaded the correct .yaml file/and ran

conda env create -f dlc-macOS-CPU.yaml

The environment was created successfully, but DLC was not installed: I received an error that psutil failed to install

In file included from /opt/miniconda3/envs/dlc-macOS-CPU/include/python3.6m/Python.h:25,
                     from psutil/_psutil_common.c:9:
    /usr/local/lib/gcc/x86_64-apple-darwin17.5.0/8.1.0/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
     #include <_stdio.h>
    compilation terminated.
    error: command 'gcc' failed with exit status 1

Eventually, I found a similar problem here:
and the solution was the same. In my base environment I ran:

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
conda env remove --name dlc-macOS-CPU #to remove the partially installed environment from the previous step
conda env create -f dlc-macOS-CPU.yaml #to reinstall

And that seems to have installed fine. IDK if this was because I already had gcc installed via homebrew, or if the gcc that comes with conda is the issue, or something else entirely.

1 Like

Thanks for sharing! Very helpful incase others have this issue!

Thanks for sharing! I had the same problem and solved according your codes.


1 Like