小编Jac*_*row的帖子

无法在 Jupyter Notebook 中使用 pip

我想在 Jupyter Notebook 中使用 pip,但运行代码时出现语法错误

pip install hyperopt
 File "<ipython-input-3-156c4fe098ed>", line 1
pip install hyperopt
          ^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)

错误图像

python pip machine-learning

1
推荐指数
1
解决办法
2万
查看次数

'function'对象没有属性'data'

from sklearn import datasets 
iris=datasets.load_iris
X = iris.data
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-15-12a2d725131f> in <module>()
----> 1 X = iris.data

AttributeError: 'function' object has no attribute 'data

I load iris dataset from sklearn ,but when i write "X = iris.data",an error occur as "AttributeError: 'function' object has no attribute 'data'"
Run Code Online (Sandbox Code Playgroud)

python scikit-learn

0
推荐指数
1
解决办法
3121
查看次数

标签 统计

python ×2

machine-learning ×1

pip ×1

scikit-learn ×1