0

I have used "apt-cyg install python3-devel" on my Cygwin terminal. I have included directories in CMake...

include_directories(C:/Users/{my_user_name}/anaconda3/include)

and importantly in my main.cpp

#include <Python.h>

and have tried "Python.h", and "fullpath/Python.h". I get back the error "fatal error: Python.h: No such file or directory". Thanks for any help.

1 Answer 1

0

There are several versions of Python.h, every one for its Cygwin python package

$ cygcheck -l python38-devel|grep Python.h
/usr/include/python3.8/Python.h

$ cygcheck -l python36-devel|grep Python.h
/usr/include/python3.6m/Python.h

Anaconda is NOT a Cygwin python, so mixing will not work well.
apt-cyg is not the standard tool for installing Cygwin packages. Use Cygwin setup program to avoid problem.

Sign up to request clarification or add additional context in comments.

1 Comment

using the new path it returns after running 'cygcheck -l python38-devel|grep Python.h', seems to work, thank you. You said Anaconda causes problems... Is there any way to avoid these problems? I would love to use the libraries included in Anaconda - or do I just have to install the libraries I want on this other instance of Python?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.