python xlrd安装_Python:在使用pip安装xlrd之后:“ImportError:no module named xlrd”

在使用pip安装xlrd之后,我仍然无法让它在我的脚本中工作。我不确定我是否遗漏了一些显而易见的东西-请帮忙!

目前,在命令行中输入pip list可以得到以下结果:pip (9.0.1)

setuptools (32.1.0)

wheel (0.29.0)

xlrd (1.0.0)

输入pip show xlrd将给出:Name: xlrd

Version: 1.0.0

Summary: Library for developers to extract data from Microsoft Excel (tm) spreadsheet files

Home-page: http://www.python-excel.org/

Author: John Machin

Author-email: sjmachin@lexicon.net

License: BSD

Location: /usr/local/lib/python2.7/site-packages

Requires:

然而,如果我进入python环境(通过在命令行上键入python)并尝试导入,那么我得到的是:Python 2.7.10 (default, Feb 7 2017, 00:08:15)

[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import xlrd

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named xlrd

以前有人遇到过这个问题吗?我还安装了python 3,并通过pip3下载了xlrd。然而import xlrd在两个版本(2或3)上都不起作用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值