美文网首页数客联盟
离线安装python hdfs

离线安装python hdfs

作者: Woople | 来源:发表于2021-07-01 21:54 被阅读0次

http://mirrors.aliyun.com/pypi/simple/下载docopt-0.6.2.tar.gzhdfs-2.6.0.tar.gz,解压先安装docopt,执行python3 setup.py install,同样方式安装hdfs-2.6.0.tar.gz
通过下面代码进行测试

from hdfs import *
import pandas as pd
client=InsecureClient("http://host1:9870",user='hdfs')
df1 = pd.DataFrame([[1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7]],index=list('1234'), columns=list('ABCD'))
client.write('/tmp/abc.csv', df1.to_csv(header=False,index=False), encoding='utf-8',overwrite=True)
client.list('/tmp')

相关文章

  • 离线安装python hdfs

    在http://mirrors.aliyun.com/pypi/simple/[http://mirrors.al...

  • pandas 离线安装

    1.查看python 版本 cmd ---->python --version 2.下载pandas离线安装包...

  • 离线安装virtualenv和django

    工作中需要离线安装django,记录下: 环境:离线机器系统:centos 6.5python 版本: pytho...

  • python操作hdfs

    hdfs模块时python的一个第三方库,可以允许直接对hadoop的hdfs模块进行访问. 安装 安装hadoo...

  • 离线环境中使用pip安装第三方库

    安装pip新版python中已经包含有pip,直接安装python即可得到pip,可能版本较老;确需离线状态下安装...

  • 2022-02-15

    ambari安装hdfs组件时报错 Python script has been killed due to ti...

  • python pandas dataframe 写入hdfs

    只能python3 python2 pip 安装包的时候报错 pip install hdfs[avro,dat...

  • 离线安装Python环境

    一、Python 环境离线安装(anaconda3) 1. 到anaconda官网下载anaconda安装包,下载...

  • Django安装步骤

    django安装分为在线安装和离线安装两种 1.在线安装,使用cmd命令进入python的安装目录下的Script...

  • Windows 下安装Scrapy步骤

    1.安装Python,这个不用不说了吧 2.安装依赖包 2.1安装wheel,因为需要离线安装库文件 2.2安装离...

网友评论

    本文标题:离线安装python hdfs

    本文链接:https://www.haomeiwen.com/subject/doesultx.html