I've been trying to install the pyephem module on my Raspberry Pi 3. It says:

"No such file or directory: cdefs.h"

I tried installing it with both 'sudo pip install pyephem' and 'sudo pip3 install pyephem'

I have no idea on how to fix this. Can someone help me? I'm not sure if this is the right place to post this question, if it's not, please let me know where to post it.

  • Try this sudo apt-get install libc6-dev libc6 Commented Feb 26, 2017 at 14:18
  • Surely: sudo apt-get install build-essential ?
    – Don
    Commented Dec 7, 2017 at 22:06

1 Answer 1


PyEphem needs a working development environment, so before installation you'll need to:

sudo apt install build-essential

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.