我正在试用谷歌的AI平台Notebook (目前仍处于测试阶段)。我上传了一个依赖于sklearn_pandas的python脚本,我得到了这个错误:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-24f79569b871> in <module>
----> 1 from sklearn_pandas import DataFrameMapper
ImportError: No module named 'sklearn_pandas'然后我尝试通过pip安装它:
!pip install sklearn-pandas我重新启动了内核,但它仍然获得相同的ImportError。我这样做是为了确认是否真的安装了sklearn pandas:
!pip list |grep -i sklearn
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
sklearn-pandas (1.8.0)有人试过这个吗?在此之前我使用过google colab,我从来没有遇到过这样的困难。如果Google colab级别的用户体验可以移植到这个测试版产品中,那就太好了。我认为这可能是一个一般性的python模块导入问题,而不仅仅是sklearn_pandas。
发布于 2019-07-16 03:00:19
我想可能是
%pip install sklearn-pandas而不是"!pip“。
https://stackoverflow.com/questions/56316445
复制相似问题