第一步安装好hadoop集群配置 安装 python hdfs 客户端 修改hdfs 根目录权限 pip install hdfs hdfs dfs -chmod 777 / # pip install hdfs from hdfs import Client # 连接ip client = Client("http://192.168.206.100:9870/", root="/") # 在根目录下创建mydir目录 client.makedirs