小编use*_*677的帖子

Python 2.7的xlrd导入问题

我有一个在Python中读取Excel数据的任务.我安装了Python 2.7.我尝试在Windows中使用以下命令安装xlrd0.8.0.

C:\Python27\xlrd-0.8.0>python setup.py build
running build
running build_py
creating build
creating build\lib
creating build\lib\xlrd
copying xlrd\biffh.py -> build\lib\xlrd
....


C:\Python27\xlrd-0.8.0>python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
running install_egg_info
Writing C:\Python27\Lib\site-packages\xlrd-0.8.0-py2.7.egg-info
Run Code Online (Sandbox Code Playgroud)

安装时我没有收到任何错误消息.我还在/ lib文件夹中的site-packages中看到xlrd-0.8.0文件夹...

但是当我尝试导入它时,Python无法识别它......

>>> import xlrd
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import xlrd
ImportError: No module named xlrd
Run Code Online (Sandbox Code Playgroud)

你能建议如何找到问题吗?

python xlrd python-2.7

13
推荐指数
1
解决办法
5万
查看次数

标签 统计

python ×1

python-2.7 ×1

xlrd ×1