易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 4199|回复: 2
收起左侧

Python模块安装:xlrd-1.1.0

[复制链接]
发表于 2019-6-11 16:00:26 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
1. 下载0 c' D. p$ ?$ [/ j
xlrd-1.1.0下载地址:https://pypi.org/project/xlrd/#files+ `* J$ K# e0 [% u! A* L  Y
2. 解压到Python包的安装目录
" @, r% P! S# Q6 ?---------------------
5 j- p6 s; m9 J3 E; |

7 z& M' G6 [% H" ~3 Z5 Ecd xlrd-[color=rgb(0, 102, 102) !important]1.1.[color=rgb(0, 102, 102) !important]0' O5 l+ P  J( J$ X' [' g2 Z
sudo python setup.py install4 z' g. M: R( r4 I9 S+ y8 e# K% W
running install
7 C/ L* {( [$ S% yrunning bdist_egg
1 r; W7 G8 j& n( Irunning egg_info
4 ?. i, l' ]) n1 ewriting xlrd.egg-info/PKG-INFO2 K+ k9 ]5 l/ G! r
writing top-level names to xlrd.egg-info/top_level.txt9 w! I- I2 c! c2 P& Q3 G2 W
writing dependency_links to xlrd.egg-info/dependency_links.txt
( l2 O) b8 D, Q9 w1 B6 `! D  freading manifest file 'xlrd.egg-info/SOURCES.txt'2 x5 j; r' ?3 B3 O5 F# ~' C
reading manifest template 'MANIFEST.in'
" J& X8 v8 k+ X+ Q. H1 c" Rwarning: no files found matching 'README.html'+ e# Z* v) [6 C6 A& Z0 q' H$ H
writing manifest file 'xlrd.egg-info/SOURCES.txt'. L, r: I4 F0 @* V3 ~, L  L: D
installing library code to build/bdist.linux-x86_64/egg. Z; f3 r; u" e/ F- y  g) ]9 J( q* p
running install_lib' [+ s( D0 ~. W5 r) U
running build_py
: F8 j, x5 j, P/ C: u+ V+ t* X1 D" Vcreating build/bdist.linux-x86_64/egg% L& z  A" D5 O' F6 A
creating build/bdist.linux-x86_64/egg/xlrd
' w8 V/ ~9 ^' E. p0 R) k) \creating build/bdist.linux-x86_64/egg/xlrd/doc3 X, p* {/ _  s4 v4 a
copying build/lib/xlrd/doc/xlrd.html -> build/bdist.linux-x86_64/egg/xlrd/doc) A: r2 B  p8 Y9 U6 h% C: i/ ?7 H
copying build/lib/xlrd/doc/compdoc.html -> build/bdist.linux-x86_64/egg/xlrd/doc
7 F. M5 e9 j7 r4 Bcreating build/bdist.linux-x86_64/egg/xlrd/examples
* t. s- E# \( a$ u$ y$ a5 scopying build/lib/xlrd/examples/xlrdnameAPIdemo.py -> build/bdist.linux-x86_64/egg/xlrd/examples/ }3 v7 ^/ }0 I1 ^% P8 C1 Z; M
copying build/lib/xlrd/examples/namesdemo.xls -> build/bdist.linux-x86_64/egg/xlrd/examples8 T8 A; |& ?2 f4 J& n
copying build/lib/xlrd/formula.py -> build/bdist.linux-x86_64/egg/xlrd
' s/ w5 y* K9 V$ Acopying build/lib/xlrd/licences.py -> build/bdist.linux-x86_64/egg/xlrd7 J& f1 h" j  P0 a4 |& E7 c1 U
copying build/lib/xlrd/formatting.py -> build/bdist.linux-x86_64/egg/xlrd
* |2 Z8 C' o/ J% g2 b; Qcopying build/lib/xlrd/timemachine.py -> build/bdist.linux-x86_64/egg/xlrd3 ?; E0 w2 y" [3 ?' A0 k. J
copying build/lib/xlrd/xldate.py -> build/bdist.linux-x86_64/egg/xlrd  A3 Z) `% u/ S: b& i
copying build/lib/xlrd/sheet.py -> build/bdist.linux-x86_64/egg/xlrd( a& W7 G& [2 t
copying build/lib/xlrd/book.py -> build/bdist.linux-x86_64/egg/xlrd! l' Z  [6 e2 T. E) ]1 v. m. Q3 j
copying build/lib/xlrd/xlsx.py -> build/bdist.linux-x86_64/egg/xlrd
- ~, P( @7 n4 u+ `6 l! `copying build/lib/xlrd/compdoc.py -> build/bdist.linux-x86_64/egg/xlrd( A+ W; q5 f8 ~" t4 u' @) z
copying build/lib/xlrd/biffh.py -> build/bdist.linux-x86_64/egg/xlrd
2 c; H. o2 I" S5 f) m6 gcopying build/lib/xlrd/__init__.py -> build/bdist.linux-x86_64/egg/xlrd
9 _' L( J8 G2 a9 @( b5 |copying build/lib/xlrd/info.py -> build/bdist.linux-x86_64/egg/xlrd
' @+ [) d% C9 Q; p" Ybyte-compiling build/bdist.linux-x86_64/egg/xlrd/examples/xlrdnameAPIdemo.py to xlrdnameAPIdemo.pyc
' ?; |  d; a0 jbyte-compiling build/bdist.linux-x86_64/egg/xlrd/formula.py to formula.pyc) m5 C% O6 j/ S7 E- ^* [
byte-compiling build/bdist.linux-x86_64/egg/xlrd/licences.py to licences.pyc
, F- }) }0 Z0 t/ R. wbyte-compiling build/bdist.linux-x86_64/egg/xlrd/formatting.py to formatting.pyc& C7 x2 \; @" d( g9 [: `
byte-compiling build/bdist.linux-x86_64/egg/xlrd/timemachine.py to timemachine.pyc, @1 a3 Q( t) [
byte-compiling build/bdist.linux-x86_64/egg/xlrd/xldate.py to xldate.pyc9 f; F! j- D% C+ y
byte-compiling build/bdist.linux-x86_64/egg/xlrd/sheet.py to sheet.pyc
9 m1 B( }# `) kbyte-compiling build/bdist.linux-x86_64/egg/xlrd/book.py to book.pyc! ]8 i  o3 ~7 f7 M: l
byte-compiling build/bdist.linux-x86_64/egg/xlrd/xlsx.py to xlsx.pyc* @+ ~! q) v9 M4 I0 w% e, l4 @" d
byte-compiling build/bdist.linux-x86_64/egg/xlrd/compdoc.py to compdoc.pyc
  R! g! E  q, e& l& |8 z5 Fbyte-compiling build/bdist.linux-x86_64/egg/xlrd/biffh.py to biffh.pyc& ?  ]* V$ X5 U$ c7 K/ L% t- L; U
byte-compiling build/bdist.linux-x86_64/egg/xlrd/__init__.py to __init__.pyc
+ |, M* f; \2 p# Abyte-compiling build/bdist.linux-x86_64/egg/xlrd/info.py to info.pyc
/ A9 S$ m2 @, y% @' Z- n$ w4 |creating build/bdist.linux-x86_64/egg/EGG-INFO( X. f, ^* ~2 F; [
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
* {% j/ x  Y+ `' Crunning install_scripts
7 p3 P! r6 r8 |% r9 U* X0 A( Wrunning build_scripts
2 x# P6 Z9 S' {creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts; w! ?: u4 F  c3 T
copying build/scripts-2.7/runxlrd.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts; j4 a1 @- ?9 F- B5 n
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/runxlrd.py to 7556 M: @5 @9 x) w* z2 Z3 a8 |1 _1 b; ?
copying xlrd.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
% J$ W1 d' F# J  _copying xlrd.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
) J7 b  k  o+ S7 s7 m$ Ocopying xlrd.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
7 Q5 p' g3 k( |" l) S9 P  Qcopying xlrd.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO4 r. U8 q4 i, V! @
zip_safe flag not set; analyzing archive contents...
  D2 [  K5 O4 V+ x% {xlrd.xlsx: module references __file__  w* X, A( D, i$ ^8 S
creating 'dist/xlrd-1.0.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it6 R7 [% e: ~" u/ i& J; k" C
removing 'build/bdist.linux-x86_64/egg' (and everything under it)( J. D  R, n) l6 O  M  b; P- _
Processing xlrd-1.0.0-py2.7.egg
) t8 c* g; Y3 ~# F% w( F0 kremoving '/usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg' (and everything under it)6 T6 k( I9 Q" G& Q. q0 n
creating /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg* M1 W  {( ]! q  r
Extracting xlrd-1.0.0-py2.7.egg to /usr/lib/python2.7/site-packages
9 z, s$ u4 v* m; ^, Ixlrd 1.0.0 is already the active version in easy-install.pth9 U' d1 ?( B; _3 O, m8 Y
Installing runxlrd.py script to /usr/bin
* q2 a7 |' r/ \# BInstalled /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg
4 D6 C; S/ b1 n9 RProcessing dependencies for xlrd==1.0.0
1 T( c, K  [* b: V8 W2 E1 WFinished processing dependencies for xlrd==1.0.07 r& G! A1 o% k( O9 e3 R

xlrd-1.2.0.tar.gz

541.09 KB, 下载次数: 0

售价: 2 金钱  [记录]  [购买]

 楼主| 发表于 2019-6-11 16:00:59 | 显示全部楼层
xlrd是Python中直接读取Excel文件的包:9 s: c5 \5 ^5 ]+ k5 j% ?

: Q; h2 M: P4 R" c0 himport xlrd# b* L7 i8 S  y  b: j- y
7 C5 Z9 S4 U9 }1 y  f0 o
x_y_data = xlrd.open_workbook('Data.xlsx')
0 D. i. V8 B  F# ~all_data = x_y_data.sheets()[0]
& y8 v: Y$ i/ Z& a; V0 Lall_rows = all_data.nrows #行数
) L! G% p* h* M3 _all_cols = all_data.ncols #列数
7 D- H$ E7 r4 E& h- d& U
2 Z0 X( S! W$ E* u( g但是其实用pandas来读取更方便(pandas内部也需要xlrd包):8 c8 ?5 m& I1 H! x; G
/ ]- M3 \( {! ^+ G2 r
import pandas as pd
" ~. B' [) R6 {# C5 V* b% I6 f4 Q, {8 L$ x  _
df = pd.read_excel(datafile, header=None)
! @- e9 c( A, B7 t9 w! F% udata = df.values
2 e4 K. m+ z! \! f: _5 @# _, u. V6 _
1. 下载' @$ Y+ K( ^6 X# m2 U$ E
$ J5 _$ ~( T: w( Z
xlrd-1.1.0下载地址:https://pypi.org/project/xlrd/#files! }" Q8 }, |& X* ]* L* x8 R  u
 楼主| 发表于 2019-7-16 14:49:39 | 显示全部楼层
python setup.py install
4 N; x8 I3 N! a. ~: Y# prunning install
. O* m1 ^' ?+ R( S3 Q* Yrunning bdist_egg
  X5 [1 m6 e7 @1 i) O0 erunning egg_info
+ ?4 A& o8 b4 v/ Bwriting xlrd.egg-info/PKG-INFO
: G3 e' }& N( K1 \9 Qwriting top-level names to xlrd.egg-info/top_level.txt/ N9 K4 S" h1 {* b6 s- Y
writing dependency_links to xlrd.egg-info/dependency_links.txt4 J, U$ p0 @2 g5 t% V" X- T
reading manifest file 'xlrd.egg-info/SOURCES.txt'  ?" z* L' z' Y5 M. `' y
reading manifest template 'MANIFEST.in': q# k$ x# w; p
warning: no files found matching 'README.html'( L$ h8 j* [+ Y& V- p
writing manifest file 'xlrd.egg-info/SOURCES.txt'
! b+ {& _% y3 g( o7 \installing library code to build/bdist.linux-x86_64/egg% t% l8 R' i( X
running install_lib
6 U8 {. i; y+ c# j8 \running build_py& F* u2 S1 c% x  j) Q! x
creating build/bdist.linux-x86_64/egg
6 v" L" C1 C2 i6 P% Qcreating build/bdist.linux-x86_64/egg/xlrd( ]4 D6 `/ t. G6 x8 e' O! p
creating build/bdist.linux-x86_64/egg/xlrd/doc: O4 o& ?( {# H
copying build/lib/xlrd/doc/xlrd.html -> build/bdist.linux-x86_64/egg/xlrd/doc
& R& d) s# y) k. l, acopying build/lib/xlrd/doc/compdoc.html -> build/bdist.linux-x86_64/egg/xlrd/doc% f3 y  u0 X9 l' r1 p/ N
creating build/bdist.linux-x86_64/egg/xlrd/examples7 z1 V# @3 R8 p' [" L/ |
copying build/lib/xlrd/examples/xlrdnameAPIdemo.py -> build/bdist.linux-x86_64/egg/xlrd/examples0 O0 \, N' W7 i: P
copying build/lib/xlrd/examples/namesdemo.xls -> build/bdist.linux-x86_64/egg/xlrd/examples
7 W( z# X" f- m0 ncopying build/lib/xlrd/formula.py -> build/bdist.linux-x86_64/egg/xlrd
2 c; B4 R# R7 r, q7 K, Ccopying build/lib/xlrd/licences.py -> build/bdist.linux-x86_64/egg/xlrd
( S* [5 B6 e/ G- _% ?copying build/lib/xlrd/formatting.py -> build/bdist.linux-x86_64/egg/xlrd2 \( G( l& y# a2 S4 I
copying build/lib/xlrd/timemachine.py -> build/bdist.linux-x86_64/egg/xlrd* X: }" _6 `2 @6 o
copying build/lib/xlrd/xldate.py -> build/bdist.linux-x86_64/egg/xlrd
; F8 b/ y6 r, l6 R8 icopying build/lib/xlrd/sheet.py -> build/bdist.linux-x86_64/egg/xlrd5 A" k; Y6 K8 Q& \% w( D0 B
copying build/lib/xlrd/book.py -> build/bdist.linux-x86_64/egg/xlrd
2 o5 ~" ?  o) i! Pcopying build/lib/xlrd/xlsx.py -> build/bdist.linux-x86_64/egg/xlrd/ c, `9 g7 p8 u
copying build/lib/xlrd/compdoc.py -> build/bdist.linux-x86_64/egg/xlrd
3 j1 F3 M$ ~9 L% G# h% N6 Vcopying build/lib/xlrd/biffh.py -> build/bdist.linux-x86_64/egg/xlrd  B8 F5 X6 {( D3 E' r0 S. S: f# u' `
copying build/lib/xlrd/__init__.py -> build/bdist.linux-x86_64/egg/xlrd
$ O- X# ^5 m# S# E4 |% i" rcopying build/lib/xlrd/info.py -> build/bdist.linux-x86_64/egg/xlrd4 P% h$ ]3 \% q" u) B
byte-compiling build/bdist.linux-x86_64/egg/xlrd/examples/xlrdnameAPIdemo.py to xlrdnameAPIdemo.pyc8 n# m5 T0 x; V  W' s
byte-compiling build/bdist.linux-x86_64/egg/xlrd/formula.py to formula.pyc
- J9 M5 e7 G* ^) u2 cbyte-compiling build/bdist.linux-x86_64/egg/xlrd/licences.py to licences.pyc
, s/ }' |2 C4 w9 y! i/ [6 |byte-compiling build/bdist.linux-x86_64/egg/xlrd/formatting.py to formatting.pyc
- X8 d* \* Z/ ^" @* @  X! c. Z5 X1 rbyte-compiling build/bdist.linux-x86_64/egg/xlrd/timemachine.py to timemachine.pyc
$ t% G7 C6 R3 Rbyte-compiling build/bdist.linux-x86_64/egg/xlrd/xldate.py to xldate.pyc
) L7 M, H1 W2 r; m8 v' Bbyte-compiling build/bdist.linux-x86_64/egg/xlrd/sheet.py to sheet.pyc
* d$ A0 }/ @/ C2 h) d! ^% C2 ?byte-compiling build/bdist.linux-x86_64/egg/xlrd/book.py to book.pyc
8 L' f' V( |% I: [( pbyte-compiling build/bdist.linux-x86_64/egg/xlrd/xlsx.py to xlsx.pyc
9 k- s2 C+ z2 U: _byte-compiling build/bdist.linux-x86_64/egg/xlrd/compdoc.py to compdoc.pyc
# d# ~  M% j# Q: f- w. Q2 e* \! Y; M6 jbyte-compiling build/bdist.linux-x86_64/egg/xlrd/biffh.py to biffh.pyc7 b/ y- I8 F, B3 b+ Q+ a1 T" m
byte-compiling build/bdist.linux-x86_64/egg/xlrd/__init__.py to __init__.pyc3 F$ r: w2 K" O9 C4 ?( x% K0 ^
byte-compiling build/bdist.linux-x86_64/egg/xlrd/info.py to info.pyc( O6 @+ l9 g  G# y
creating build/bdist.linux-x86_64/egg/EGG-INFO
/ ?% ^) \5 K( I: P- Kinstalling scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
7 Z: ~( w/ p1 ~+ Hrunning install_scripts5 q) O9 u3 S: N9 L9 u( Y
running build_scripts9 W. e7 ^- V5 R% I' F
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
% ~! j( x' F0 z8 F. C2 ucopying build/scripts-2.7/runxlrd.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
8 X0 ]$ V- X5 R( m' Ichanging mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/runxlrd.py to 7552 J' p, {1 z5 x# P/ S( u
copying xlrd.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
& K, Q% i" G2 I9 mcopying xlrd.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
* N! n/ f6 X5 y& A; j  g5 Kcopying xlrd.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO9 M( j, Y0 H+ s/ N* ]
copying xlrd.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO+ [7 t, D6 ^0 a# f- D$ p; c
zip_safe flag not set; analyzing archive contents...8 k7 ^( Y: a. V, X8 v# |5 Y6 i
xlrd.xlsx: module references __file__
) `3 {6 D4 ^* C* t4 m2 dcreating 'dist/xlrd-1.0.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
& s' h0 W' \+ a4 ]) Z5 Eremoving 'build/bdist.linux-x86_64/egg' (and everything under it)% t8 q: s' K  E
Processing xlrd-1.0.0-py2.7.egg1 f) V% V# ~+ y3 M2 M+ o' l1 q- B4 q
removing '/usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg' (and everything under it)
1 I5 P. J4 a1 n' ucreating /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg
# G5 |2 {, o8 z$ n" YExtracting xlrd-1.0.0-py2.7.egg to /usr/lib/python2.7/site-packages
/ a3 |4 U& f3 w; v' z$ kxlrd 1.0.0 is already the active version in easy-install.pth+ ?1 U% A6 N; b
Installing runxlrd.py script to /usr/bin% V) \, G' o% Y* Q/ _1 f# W2 U
  t+ `# x" d% w# ?# a# f) C4 ?/ W
Installed /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg1 n, M# w( U# d' ?7 v
Processing dependencies for xlrd==1.0.0
6 ~( u" m: b' K+ T0 I' ?0 F' M8 iFinished processing dependencies for xlrd==1.0.0
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 20:22 , Processed in 0.049834 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表