推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bdbai
V2EX  ›  Python

Python 3.4.3 不能正常运行

  •  
  •   bdbai ·
    bdbai · Jun 27, 2015 via iPhone · 5000 views
    This topic created in 3976 days ago, the information mentioned may be changed or developed.
    源码安装,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
    18 replies    2015-06-29 20:43:47 +08:00
    zjxubinbin
        1
    zjxubinbin  
       Jun 28, 2015
    GCC版本多少?
    bdbai
        2
    bdbai  
    OP
       Jun 28, 2015 via iPhone
    @zjxubinbin 3.4.4
    lilydjwg
        3
    lilydjwg  
       Jun 28, 2015
    _sysconfigdata.py 这个文件没生成成功吧。你看看那个 failed 附近有没有更多的信息。

    也许你自己放一个假的 _sysconfigdata.py 可以绕过这个问题,不过也许会导致更难查到的奇怪 bug。
    lilydjwg
        4
    lilydjwg  
       Jun 28, 2015
    PS: 这 gcc 版本真够古老的。
    bdbai
        5
    bdbai  
    OP
       Jun 28, 2015 via iPhone
    @lilydjwg 编译两次都这样 最后两行:
    File "path/to/python/Lib/sysconfig.py", line 410, in _init_posix
    from _sysconfigdata import build_time_vars
    ImportError...(上面写了)
    预感放个假的问题更多
    zjxubinbin
        6
    zjxubinbin  
       Jun 28, 2015
    @bdbai 换个新一点的GCC试试吧
    bdbai
        7
    bdbai  
    OP
       Jun 28, 2015 via iPhone
    @zjxubinbin 新的都好大 目测还剩一点点ROM空间放不下
    lilydjwg
        8
    lilydjwg  
       Jun 28, 2015
    @bdbai 环境不变,问题不解决,你编译一万次都一样啊。你编译安装过程中有没有报错?
    lilydjwg
        9
    lilydjwg  
       Jun 28, 2015
    @bdbai 你为什么要把 gcc 也放到设备上?
    bdbai
        10
    bdbai  
    OP
       Jun 28, 2015 via iPhone
    @lilydjwg 有 generate-posix-vars failed
    那个gcc是里面自带的
    Septembers
        11
    Septembers  
       Jun 28, 2015 via Android
    交叉编译
    lilydjwg
        12
    lilydjwg  
       Jun 28, 2015
    @bdbai 是有的嘛。详情呢?
    bdbai
        13
    bdbai  
    OP
       Jun 28, 2015 via iPhone
    @lilydjwg 上面有一小段脚本在调用生成出来的python.exe 手动调用的时候不是Segmentation fault就是Illegal instruction
    lilydjwg
        14
    lilydjwg  
       Jun 28, 2015
    @bdbai 怎么越听感觉问题越严重了呢……
    bdbai
        15
    bdbai  
    OP
       Jun 28, 2015 via iPhone
    oott123
        16
    oott123  
       Jun 29, 2015 via Android
    诺亚舟…
    bdbai
        17
    bdbai  
    OP
       Jun 29, 2015 via iPhone
    @oott123 不要笑 搞定给你糖吃
    oott123
        18
    oott123  
       Jun 29, 2015
    @bdbai 然而我搞不定
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1014 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 19:02 · PVG 03:02 · LAX 12:02 · JFK 15:02
    ♥ Do have faith in what you're doing.