【问题标题】:lxml error when running sugiyama.py on Mac在 Mac 上运行 sugiyama.py 时出现 lxml 错误
【发布时间】:2020-01-13 20:14:12
【问题描述】:

最近我想在 Mac 上尝试 flow-project,在安装了所有要求并尝试运行 python examples/sumo/sugiyama.py 后,我收到了如下所述的错误。你能帮我解决一下吗?

Traceback (most recent call last):
  File "examples/sumo/sugiyama.py", line 7, in <module>
    from flow.core.experiment import Experiment
  File "/Users/voanhkha/Desktop/flow/flow/core/experiment.py", line 9, in <module>
    from flow.core.util import emission_to_csv
  File "/Users/voanhkha/Desktop/flow/flow/core/util.py", line 6, in <module>
    from lxml import etree
ImportError: dlopen(/Users/voanhkha/anaconda3/envs/flow/lib/python3.6/site-packages/lxml/etree.cpython-36m-darwin.so, 2): no suitable image found.  Did find:
    /Users/voanhkha/anaconda3/envs/flow/lib/python3.6/site-packages/lxml/etree.cpython-36m-darwin.so: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    /Users/voanhkha/anaconda3/envs/flow/lib/python3.6/site-packages/lxml/etree.cpython-36m-darwin.so: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

【问题讨论】:

    标签: python pip lxml conda flow-project


    【解决方案1】:

    我遇到了同样的问题并卸载了lxmlconda 版本并使用pip 重新安装。

    conda uninstall lxml
    pip install lxml
    

    【讨论】:

      猜你喜欢
      • 2016-02-09
      • 2023-01-03
      • 2014-12-27
      • 2021-11-08
      • 2019-03-08
      • 2019-06-02
      • 2015-10-21
      • 2019-03-12
      • 1970-01-01
      相关资源
      最近更新 更多