Missing pyconfig.h while installing a package

*爱你&永不变心* 提交于 2020-01-30 06:43:45

问题


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.


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/26909409/missing-pyconfig-h-while-installing-a-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!