2

最近我想在 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
4

1 回答 1

1

我遇到了同样的问题并卸载了conda版本lxml并再次使用pip.

conda uninstall lxml
pip install lxml
于 2019-09-21T12:07:24.643 回答