在ubuntu 16.04.5上检查ansible版本时出现错误

时间:2019-02-20 10:19:46

标签: ubuntu ansible

错误如下:

#data before thresh datetime
matched = df1.loc['matched']
matched.index -= 1
print (matched)
          sum   size
2015  5811589  11604
2016  5725034  11460
2017  5702078  11460

#data after thresh
nonmatched = df1.loc['nonmatched']
print (nonmatched)
           sum   size
2015  20596429  41100
2016  20478564  41100
2017  20498607  41100
2018      2321      4

#sum both DataFrames and divide sum by counts for mean
df2 = matched.add(nonmatched, fill_value=0)
out = df2['sum'].div(df2['size'])
print (out)
2015    501.062879
2016    498.546385
2017    498.490963
2018    580.250000
dtype: float64

系统说明:

Traceback (most recent call last):
  File "/usr/bin/ansible", line 40, in <module>
    from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
ImportError: No module named 'ansible'

0 个答案:

没有答案