Missing pyconfig.h while installing a package

6.2k views Asked by At

I'm using Python3 (v3.4) add-on on my Synology NAS.

When I try to install package (via ssh using python3 setup.py install) it returns error:

invalid Python installation: unable to open /volume1/@appstore/py3k/usr/local/include/python3.4m/pyconfig.h (No such file or directory)

When I search the disk for the pyconfig.h file, it finds nothing and the folder ...include/python3.4m doesn't even exist. The problem occurred some time ago (in version 3.3), but I searched the disk, found the pyconfig.h file in different location and copied it into the proper folder. Now, there isn't any file anywhere.

Is there any way how to fix this? Thank you.

2

There are 2 answers

3
user2781994 On BEST ANSWER

Thanks for answer.

Since the ipkd is disabled on Synology NAS, I would have to use bootstrap in order to install ipkd (to do so, see this). And that was the only think I didn't want to do also because it invalidates software support warranty. But it worked previously, so I emailed the Synology Tech Support and got this response:

According to our check,

to keep system stable, we had removed pyconfig.h in python3, due to a module base requirement, and Diskstation does not provide cross compiler function.

But they also provided me the missing pyconfig.h which I copied to the requested folder and since then everything has worked like a magic.

1
xbello On

You have to install the python-development package, whatever the distribution uses your NAS. But if you are able to install packages, maybe you can install directly the python3. Lets suppose you have the ipkg command available. Try:

# ipkg install python34

Or

# ipkg install python-dev (or python-devel or python-development)
# python3 setup install