运行时出现错误AttributeError: 'NoneType' object has no attribute 'format'

运行时出现如下的报错

import pandas as pd
import numpy as np

print("Missing required dependencies {values}".format(values = ['aaa', 'bbb'])
AttributeError: 'NoneType' object has no attribute 'format'

.format必须放到print语句里面

print("Missing required dependencies {values}".format(values = ['aaa', 'bbb']))

结果

Missing required dependencies ['aaa', 'bbb']

显示正常了

你可能感兴趣的:(python,numpy,机器学习)