在安装Python版本3.8.10的koalas时遇到的问题(AttributeError:模块'numpy'没有属性'bool')

inn6fuwd  于 2023-06-06  发布在  Python
关注(0)|答案(1)|浏览(543)

根据本文件https://koalas.readthedocs.io/en/latest/getting_started/install.html
系统信息:

numpy   1.24.3  
koalas  1.8.2 
pyspark 3.4.0 
Python  3.8.10

尝试读取csv文件时遇到问题

import databricks.koalas as ks
import time
import numpy as np
df_koalas=ks.read_csv('train.csv')

属性错误:模块'numpy'没有属性'bool'

AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
az31mfrm

az31mfrm1#

Koalas已经有一段时间没有作为单独的项目进行维护了,就像Spark 3.2.0的its functionality was incorporated directly into PySpark一样。它与最近的NumPy版本不兼容。您需要迁移到the new Spark Pandas API

相关问题