易陆发现互联网技术论坛

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

Python模块安装:xlrd-1.1.0

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

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

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

x
1. 下载
* U4 z+ u. d, I5 c/ J# }3 q$ N3 ixlrd-1.1.0下载地址:https://pypi.org/project/xlrd/#files
9 z; c' v2 a* R) u& v7 z2. 解压到Python包的安装目录9 ?( g" u7 w( M! P' M
---------------------
3 w) u: W8 [9 h. o
3 f  e4 u3 O2 U) f/ E9 J) C# x
cd xlrd-[color=rgb(0, 102, 102) !important]1.1.[color=rgb(0, 102, 102) !important]0+ m5 h2 S  M' @: X: A
sudo python setup.py install0 m. A$ z/ `1 z/ M* V4 V1 ]8 ~9 f
running install
: G( U. N4 D' M0 u& [running bdist_egg
; z+ x* Z, V- ^- p% \7 x9 G% x7 Brunning egg_info
# G# G; h# D' W4 w; ]writing xlrd.egg-info/PKG-INFO
& H2 Y! @7 Q1 Xwriting top-level names to xlrd.egg-info/top_level.txt; S6 D+ s# n/ P2 C4 O0 {+ c
writing dependency_links to xlrd.egg-info/dependency_links.txt# F) P) Q  X/ p, B  ~
reading manifest file 'xlrd.egg-info/SOURCES.txt'9 h0 s) i% k3 Z6 L  ^5 @
reading manifest template 'MANIFEST.in'/ W, P' P5 R: h
warning: no files found matching 'README.html'- @9 ~  m% _$ ~  U
writing manifest file 'xlrd.egg-info/SOURCES.txt': O1 _9 e) c8 ]
installing library code to build/bdist.linux-x86_64/egg5 O9 Z& u3 @! q. U" P' t
running install_lib
+ [, s3 z, i, |% @3 n! i+ i# ^running build_py
4 P, j1 ?2 ^  e' D- g9 Ecreating build/bdist.linux-x86_64/egg
  U3 D- E3 h) r  d% Wcreating build/bdist.linux-x86_64/egg/xlrd
, ~; P) T( {1 x- o7 F& d8 G/ Dcreating build/bdist.linux-x86_64/egg/xlrd/doc' B4 C2 }7 F  k8 C& d2 v
copying build/lib/xlrd/doc/xlrd.html -> build/bdist.linux-x86_64/egg/xlrd/doc
1 R/ s% p/ b+ j' T2 T( |copying build/lib/xlrd/doc/compdoc.html -> build/bdist.linux-x86_64/egg/xlrd/doc5 V  D6 @% [7 ?4 k% B+ a3 G
creating build/bdist.linux-x86_64/egg/xlrd/examples
* W0 Q. }" G! Z8 V; bcopying build/lib/xlrd/examples/xlrdnameAPIdemo.py -> build/bdist.linux-x86_64/egg/xlrd/examples( ?: X8 `! m5 I' y* d  ^5 w
copying build/lib/xlrd/examples/namesdemo.xls -> build/bdist.linux-x86_64/egg/xlrd/examples& C6 @9 |+ u' L& g4 K0 n
copying build/lib/xlrd/formula.py -> build/bdist.linux-x86_64/egg/xlrd
+ j1 ^% v. Q0 R2 ]9 i1 {  C) acopying build/lib/xlrd/licences.py -> build/bdist.linux-x86_64/egg/xlrd
' V& V- n' N+ ~! s" _" G! C# qcopying build/lib/xlrd/formatting.py -> build/bdist.linux-x86_64/egg/xlrd. V! [# M. _( d3 }1 A
copying build/lib/xlrd/timemachine.py -> build/bdist.linux-x86_64/egg/xlrd
, ^' A) T' }" `* [1 V0 P% b. bcopying build/lib/xlrd/xldate.py -> build/bdist.linux-x86_64/egg/xlrd
; X5 u1 E) K4 Q- w  f+ Zcopying build/lib/xlrd/sheet.py -> build/bdist.linux-x86_64/egg/xlrd% `. a+ b2 m7 d6 }* @
copying build/lib/xlrd/book.py -> build/bdist.linux-x86_64/egg/xlrd
5 R* z; P' X4 K! I8 Acopying build/lib/xlrd/xlsx.py -> build/bdist.linux-x86_64/egg/xlrd0 |+ u8 h+ e& {
copying build/lib/xlrd/compdoc.py -> build/bdist.linux-x86_64/egg/xlrd& a% R# A; s" X' B2 h* E
copying build/lib/xlrd/biffh.py -> build/bdist.linux-x86_64/egg/xlrd
' ~8 D4 T7 R. c' [copying build/lib/xlrd/__init__.py -> build/bdist.linux-x86_64/egg/xlrd
& V. v3 w; \: I6 Hcopying build/lib/xlrd/info.py -> build/bdist.linux-x86_64/egg/xlrd
" I0 o. W- c' Q3 y" l5 Tbyte-compiling build/bdist.linux-x86_64/egg/xlrd/examples/xlrdnameAPIdemo.py to xlrdnameAPIdemo.pyc
8 A8 H0 T- A; Y% n$ e9 xbyte-compiling build/bdist.linux-x86_64/egg/xlrd/formula.py to formula.pyc: n& V% C: J2 A% ^
byte-compiling build/bdist.linux-x86_64/egg/xlrd/licences.py to licences.pyc
. i1 |/ L" ?# }) K" K% w+ ^byte-compiling build/bdist.linux-x86_64/egg/xlrd/formatting.py to formatting.pyc, r* [- H% W6 e7 g+ W* F
byte-compiling build/bdist.linux-x86_64/egg/xlrd/timemachine.py to timemachine.pyc2 c1 V" L$ }) l! [  u0 q. l
byte-compiling build/bdist.linux-x86_64/egg/xlrd/xldate.py to xldate.pyc5 C9 t5 y6 F; Q3 T1 v6 ~
byte-compiling build/bdist.linux-x86_64/egg/xlrd/sheet.py to sheet.pyc
0 O, w, G) u* Z# r' }byte-compiling build/bdist.linux-x86_64/egg/xlrd/book.py to book.pyc1 O- [; s8 S' X
byte-compiling build/bdist.linux-x86_64/egg/xlrd/xlsx.py to xlsx.pyc
7 v$ s& A3 V6 O1 A7 v# zbyte-compiling build/bdist.linux-x86_64/egg/xlrd/compdoc.py to compdoc.pyc
# g5 W7 y8 t$ X( l7 w$ kbyte-compiling build/bdist.linux-x86_64/egg/xlrd/biffh.py to biffh.pyc' X6 w. U( Y/ j3 ^6 F
byte-compiling build/bdist.linux-x86_64/egg/xlrd/__init__.py to __init__.pyc
2 o/ m6 n4 S( \1 j) `  abyte-compiling build/bdist.linux-x86_64/egg/xlrd/info.py to info.pyc
9 k* D3 H$ d, H% F6 Ecreating build/bdist.linux-x86_64/egg/EGG-INFO6 U" Q; Y3 J  [
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
# }1 @5 X5 X" m0 arunning install_scripts) T6 c. E. }) P2 z5 z; d' w
running build_scripts
+ O' t3 `/ k  d8 Qcreating build/bdist.linux-x86_64/egg/EGG-INFO/scripts& \5 N) _* N' Y, v
copying build/scripts-2.7/runxlrd.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
- L( M4 v+ ~5 i/ Gchanging mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/runxlrd.py to 7559 x7 P4 U  \- K. c+ U
copying xlrd.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO& p2 \# t7 X  B+ j" ?
copying xlrd.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO$ m& Z. F( |/ o  a
copying xlrd.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO6 v; O# }+ {8 v9 u$ l7 I( }% o6 {
copying xlrd.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO& t1 D4 `2 ^1 e5 |2 l8 M# q
zip_safe flag not set; analyzing archive contents...) A9 T' I6 u; U- r
xlrd.xlsx: module references __file__
# n% i7 c0 B* `( @: |6 jcreating 'dist/xlrd-1.0.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it3 f( ^1 ~0 \, ~
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
; x4 T( v* x7 @1 iProcessing xlrd-1.0.0-py2.7.egg+ D& \5 }5 f: {8 D3 ^
removing '/usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg' (and everything under it)
8 u3 N; ]9 _+ N3 O/ |creating /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg
& N0 m4 W* g1 i9 T/ L# T8 sExtracting xlrd-1.0.0-py2.7.egg to /usr/lib/python2.7/site-packages
5 I4 z8 m) `+ v5 rxlrd 1.0.0 is already the active version in easy-install.pth
" v* R3 [% n0 d4 S( j8 Z+ H- `& aInstalling runxlrd.py script to /usr/bin
2 Q+ Y! A) z7 s8 Q0 Q( J% k0 z0 PInstalled /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg
' S- \+ v4 E: s$ y7 EProcessing dependencies for xlrd==1.0.0! p" E& T) Q* C* t' H+ v
Finished processing dependencies for xlrd==1.0.08 I! t- }7 Y) Z

xlrd-1.2.0.tar.gz

541.09 KB, 下载次数: 0

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

 楼主| 发表于 2019-6-11 16:00:59 | 显示全部楼层
xlrd是Python中直接读取Excel文件的包:
( ]& Z1 r3 @) i4 ^% z9 m+ y% E* y! s* N. ^- u
import xlrd- J' E! u$ s9 t! I1 Y9 ~4 i! d4 w2 }

2 |- l8 g( [; L' @) Ex_y_data = xlrd.open_workbook('Data.xlsx')* _& m: ]1 B" c# O# u
all_data = x_y_data.sheets()[0]) H* S# E9 ~4 b0 q
all_rows = all_data.nrows #行数3 |$ C4 f/ ]' u+ V, p1 @
all_cols = all_data.ncols #列数
! x* t$ h1 u% `+ `8 v
* b3 H& B1 d6 r5 W4 j+ \但是其实用pandas来读取更方便(pandas内部也需要xlrd包):
) V2 d( H5 s" P3 r
% v1 Z' }7 Y2 K" a; M% Bimport pandas as pd9 L% J1 R. y" V* [* Q$ u# F- K

. E  c$ a& s# zdf = pd.read_excel(datafile, header=None)3 c  \2 h" O( n  f! q! j. c
data = df.values* d; x' n; [* g( n/ V
. z: Z. [1 f9 [1 g  W/ r
1. 下载
- O) M2 I/ |  p; T5 X
" ]$ t! e6 E6 C3 |xlrd-1.1.0下载地址:https://pypi.org/project/xlrd/#files
: n" s+ S6 G, U
 楼主| 发表于 2019-7-16 14:49:39 | 显示全部楼层
python setup.py install
) A: A! F, J. f" ?: ?* jrunning install: E" R# d) P1 |' o
running bdist_egg
+ x+ F: g2 K' @6 r" p! hrunning egg_info
: x1 m9 u+ n2 j( @' ?4 Xwriting xlrd.egg-info/PKG-INFO" u) W+ m. \4 X+ }, l& F
writing top-level names to xlrd.egg-info/top_level.txt
8 ]3 ?* h  q# k6 C: _writing dependency_links to xlrd.egg-info/dependency_links.txt
3 ?! s9 P, L0 E. E% Areading manifest file 'xlrd.egg-info/SOURCES.txt'! p% p( W& e0 W" s2 U  s4 q
reading manifest template 'MANIFEST.in'
% y' u) f# N  J- q$ Rwarning: no files found matching 'README.html'
1 g4 X1 B- a0 O1 i2 r& r# \. swriting manifest file 'xlrd.egg-info/SOURCES.txt'& n: l. I# m" S* `/ [6 _1 k. v5 S
installing library code to build/bdist.linux-x86_64/egg8 u* I& i+ n  l
running install_lib- r# h7 X9 n" I+ j. n
running build_py5 f$ K: J5 B1 j0 i; A# p
creating build/bdist.linux-x86_64/egg" P1 e# p7 c. I( G0 ~7 z7 x
creating build/bdist.linux-x86_64/egg/xlrd$ B* E* i  C) L
creating build/bdist.linux-x86_64/egg/xlrd/doc. Q  N5 W6 ~: ~; O
copying build/lib/xlrd/doc/xlrd.html -> build/bdist.linux-x86_64/egg/xlrd/doc# `% t1 x& |- s) P# M9 c
copying build/lib/xlrd/doc/compdoc.html -> build/bdist.linux-x86_64/egg/xlrd/doc
: g+ C# b6 M/ {' {6 xcreating build/bdist.linux-x86_64/egg/xlrd/examples
* F' g% r) M, P) V& [copying build/lib/xlrd/examples/xlrdnameAPIdemo.py -> build/bdist.linux-x86_64/egg/xlrd/examples
  d# P7 L( U* }7 h. c( n) ~/ |" J9 vcopying build/lib/xlrd/examples/namesdemo.xls -> build/bdist.linux-x86_64/egg/xlrd/examples' v, i/ H' c( S9 C$ a: N1 G
copying build/lib/xlrd/formula.py -> build/bdist.linux-x86_64/egg/xlrd% b1 b- W/ U2 ?- _
copying build/lib/xlrd/licences.py -> build/bdist.linux-x86_64/egg/xlrd% U# k5 t! ]: A, W, _0 F1 h
copying build/lib/xlrd/formatting.py -> build/bdist.linux-x86_64/egg/xlrd2 |+ q/ {) o. Y  _3 ]
copying build/lib/xlrd/timemachine.py -> build/bdist.linux-x86_64/egg/xlrd$ w' A1 ^- ]# O! o$ T7 H
copying build/lib/xlrd/xldate.py -> build/bdist.linux-x86_64/egg/xlrd% ]1 E0 s% e/ C9 K
copying build/lib/xlrd/sheet.py -> build/bdist.linux-x86_64/egg/xlrd' v. l( a! w. U/ n5 J* x
copying build/lib/xlrd/book.py -> build/bdist.linux-x86_64/egg/xlrd# O: p& L5 V$ ~" [, V. N- j
copying build/lib/xlrd/xlsx.py -> build/bdist.linux-x86_64/egg/xlrd8 o. b8 H; D# I5 b
copying build/lib/xlrd/compdoc.py -> build/bdist.linux-x86_64/egg/xlrd# o+ I" T( s' W* C$ A' D; j6 {
copying build/lib/xlrd/biffh.py -> build/bdist.linux-x86_64/egg/xlrd# @3 t1 _+ |% j& X
copying build/lib/xlrd/__init__.py -> build/bdist.linux-x86_64/egg/xlrd
0 }3 v9 F7 v( K6 hcopying build/lib/xlrd/info.py -> build/bdist.linux-x86_64/egg/xlrd
7 S* q  U6 N5 T& }5 T; I  `! jbyte-compiling build/bdist.linux-x86_64/egg/xlrd/examples/xlrdnameAPIdemo.py to xlrdnameAPIdemo.pyc: q/ V! f. g0 n9 d
byte-compiling build/bdist.linux-x86_64/egg/xlrd/formula.py to formula.pyc8 @! D9 f: m1 O, k# r/ b$ ]
byte-compiling build/bdist.linux-x86_64/egg/xlrd/licences.py to licences.pyc
6 @' j3 r: `" Cbyte-compiling build/bdist.linux-x86_64/egg/xlrd/formatting.py to formatting.pyc
( Q6 _  }  b  X0 @) U3 ?0 |9 Ibyte-compiling build/bdist.linux-x86_64/egg/xlrd/timemachine.py to timemachine.pyc2 b7 N+ L2 e4 {; I3 S/ \
byte-compiling build/bdist.linux-x86_64/egg/xlrd/xldate.py to xldate.pyc! |! ~5 y( u( M7 ^) A) ?
byte-compiling build/bdist.linux-x86_64/egg/xlrd/sheet.py to sheet.pyc
7 D+ L$ S1 a9 D. ^; e+ F5 Dbyte-compiling build/bdist.linux-x86_64/egg/xlrd/book.py to book.pyc* Z# V6 c' f. b! G6 z
byte-compiling build/bdist.linux-x86_64/egg/xlrd/xlsx.py to xlsx.pyc
, P! I9 c4 C3 a7 w. x. y7 Xbyte-compiling build/bdist.linux-x86_64/egg/xlrd/compdoc.py to compdoc.pyc3 a4 a& o) J- x+ |. q
byte-compiling build/bdist.linux-x86_64/egg/xlrd/biffh.py to biffh.pyc/ i% [2 O/ B: q
byte-compiling build/bdist.linux-x86_64/egg/xlrd/__init__.py to __init__.pyc8 L4 m4 C2 `9 W
byte-compiling build/bdist.linux-x86_64/egg/xlrd/info.py to info.pyc
2 Z3 Y, y- Y9 [creating build/bdist.linux-x86_64/egg/EGG-INFO
. j) r4 t$ {4 _5 A2 j3 Uinstalling scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts  |0 u; s3 B7 _1 ~% r8 i
running install_scripts1 O" X0 v6 {8 M7 d* Z  f
running build_scripts
% y9 W/ q( [5 Kcreating build/bdist.linux-x86_64/egg/EGG-INFO/scripts" P% w* v8 R/ d8 h
copying build/scripts-2.7/runxlrd.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts0 U) C/ r  ?% j# l$ \
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/runxlrd.py to 7551 K. B% ]0 G+ c; H# M' `
copying xlrd.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
/ i0 S4 {6 l& s$ D, ccopying xlrd.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
* O1 U) p8 D5 r/ u9 v# q  C4 tcopying xlrd.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
3 a% L8 N+ C* [2 e1 G2 Q/ T: _, ocopying xlrd.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
8 b6 W' Q. A# U) wzip_safe flag not set; analyzing archive contents...0 j4 n9 u; d' |* I+ J
xlrd.xlsx: module references __file__2 V% W# f2 I" H' F
creating 'dist/xlrd-1.0.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
- ]2 n) D0 X! D, \5 Premoving 'build/bdist.linux-x86_64/egg' (and everything under it)
. v9 M9 c! ~4 @: D( lProcessing xlrd-1.0.0-py2.7.egg
. e+ O. W! @" y: r0 Q; p. Premoving '/usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg' (and everything under it)
6 K/ ?- L! a8 J$ P" C2 E: C7 `$ Zcreating /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg0 ^, I  c1 R. `- \# ?+ I, K. ]
Extracting xlrd-1.0.0-py2.7.egg to /usr/lib/python2.7/site-packages$ n% v3 u8 `3 N- j) w6 a
xlrd 1.0.0 is already the active version in easy-install.pth) M/ ?# M. [  ^. C/ j  ~9 ?
Installing runxlrd.py script to /usr/bin0 c" j6 _5 i) @2 [4 I

* H) p% d- D8 l4 B3 Z* `Installed /usr/lib/python2.7/site-packages/xlrd-1.0.0-py2.7.egg  [- m) b8 V  ~1 B" q9 i' Y
Processing dependencies for xlrd==1.0.0
. O' \7 @% V2 |" lFinished processing dependencies for xlrd==1.0.0
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

GMT+8, 2026-4-8 21:30 , Processed in 0.072380 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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