无法导入'ast':Angstrom上的Flask安装(Beaglebone black)

时间:2015-12-07 04:54:22

标签: python flask beagleboneblack angstrom-linux

尝试在我的beaglebone black(Cloud9 GNOME Image 2013.09.04)上安装Flask时,遇到模块ast的ImportError(安装Werkzeug模块)。我有Python 2.7.3版本,所以这个内置版本应该不存在?

以下是日志:

Downloading/unpacking Flask
  Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded
  Running setup.py egg_info for package Flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Werkzeug>=0.7 (from Flask)
  Downloading Werkzeug-0.11.2.tar.gz (1.2MB): 1.2MB downloaded
  Running setup.py egg_info for package Werkzeug
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-root/Werkzeug/setup.py", line 56, in <module>
        import ast
    ImportError: No module named ast
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build-root/Werkzeug/setup.py", line 56, in <module>

    import ast

ImportError: No module named ast

我尝试在此主板上定期导入ast,但我无法这样做。很可能它根本不存在,但我的python和python-dev被报告为最新。

帮助!

1 个答案:

答案 0 :(得分:1)

Angstrom BeagleBone图像有一个奇怪的,有点破碎的Python 2.7 IIRC版本,BeagleBoard.org不再支持它们。您应该真正升级到BeagleBoard.org(http://beagleboard.org/latest-images)维护和支持的当前Debian映像之一 - 我已经毫不费力地使用了烧瓶。