Python 3.4.3 不能正常运行

2015 年 6 月 27 日
 bdbai
源码安装,make install到一半显示generate-posix-vars failed,但目录下已经有了python.exe(Linux平台),传-V或--help有输出,传-S可以用但是自带库没有了,传-或-i或不传参数提示Failed to import the site module,最后一行ImportError: No module named '_sysconfigdata'
环境?不要笑 诺亚舟NP1500 busybox1.1
4957 次点击
所在节点    Python
18 条回复
zjxubinbin
2015 年 6 月 28 日
GCC版本多少?
bdbai
2015 年 6 月 28 日
@zjxubinbin 3.4.4
lilydjwg
2015 年 6 月 28 日
_sysconfigdata.py 这个文件没生成成功吧。你看看那个 failed 附近有没有更多的信息。

也许你自己放一个假的 _sysconfigdata.py 可以绕过这个问题,不过也许会导致更难查到的奇怪 bug。
lilydjwg
2015 年 6 月 28 日
PS: 这 gcc 版本真够古老的。
bdbai
2015 年 6 月 28 日
@lilydjwg 编译两次都这样 最后两行:
File "path/to/python/Lib/sysconfig.py", line 410, in _init_posix
from _sysconfigdata import build_time_vars
ImportError...(上面写了)
预感放个假的问题更多
zjxubinbin
2015 年 6 月 28 日
@bdbai 换个新一点的GCC试试吧
bdbai
2015 年 6 月 28 日
@zjxubinbin 新的都好大 目测还剩一点点ROM空间放不下
lilydjwg
2015 年 6 月 28 日
@bdbai 环境不变,问题不解决,你编译一万次都一样啊。你编译安装过程中有没有报错?
lilydjwg
2015 年 6 月 28 日
@bdbai 你为什么要把 gcc 也放到设备上?
bdbai
2015 年 6 月 28 日
@lilydjwg 有 generate-posix-vars failed
那个gcc是里面自带的
Septembers
2015 年 6 月 28 日
交叉编译
lilydjwg
2015 年 6 月 28 日
@bdbai 是有的嘛。详情呢?
bdbai
2015 年 6 月 28 日
@lilydjwg 上面有一小段脚本在调用生成出来的python.exe 手动调用的时候不是Segmentation fault就是Illegal instruction
lilydjwg
2015 年 6 月 28 日
@bdbai 怎么越听感觉问题越严重了呢……
bdbai
2015 年 6 月 28 日
oott123
2015 年 6 月 29 日
诺亚舟…
bdbai
2015 年 6 月 29 日
@oott123 不要笑 搞定给你糖吃
oott123
2015 年 6 月 29 日
@bdbai 然而我搞不定

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/201654

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX