找不到Aimsun / Flow-project的模块流程

时间:2019-10-01 14:46:14

标签: flow-project

我正在尝试为Aimsun运行sugiyama.py示例,但是它一直失败,并且我得到的错误是

  

没有名为“流”的模块。”

我已经激活了流环境(而不是df_store = pd.read_excel(SourcePath+SourceFile, sheet_name='StoreSales', header=0, usecols=['StoreName']) # Number rows of all irrelevant stores. row_numbers = [x+1 for x in df_stores[(df_store['StoreName'] != 'Store1') & (df_store['StoreName'] != 'Store2') & (df_store['StoreName'] !='Store3')].index] # Read in entire Excel file, skipping the rows of irrelevant stores. df_store = pd.read_excel(SourcePath+SourceFile, sheet_name='StoreSales', header=0, usecols = "A:BE", skiprows = row_numbers, converters = {'StoreName' : str}) # Transpose dataframe df_store_t = df_store.transpose() ),并且还修改了aimsun-flow中的AIMSUN_NEXT_PATHAIMSUN_SITEPACKAGES目录。

是否与我当前使用的Windows 7 OS有关?还是拥有我的Aimsun许可证?

1 个答案:

答案 0 :(得分:0)

此问题将在Flow的下一版本中修复。您可以遵循GitHub issue。现在,您可以将目录更改为Flow目录(path/to/flow),然后从此处运行示例,例如python examples/aimsun/sugiyama.py。另一个选择是将Flow目录的路径添加到PYTHONPATH。您可以运行export PYTHONPATH="$PYTHONPATH:/path/to/flow",然后运行示例。