在Python 3.6中安装Xlrd后出现错误

时间:2018-05-10 16:30:36

标签: python excel python-3.x

我已经安装了Pl of Xlrd并且我看到了成功

C:\Users\<FilePath>\AppData\Local\Programs\Python\Python36\Scripts>pip.exe install C:\Users\<FilePath>\Downloads\xlrd-1.1.0-py2.py3-none-any.whl
Requirement already satisfied: xlrd==1.1.0 from file:///C:/Users/<FilePath>/Downloads/xlrd-1.1.0-py2.py3-none-any.whl in c:\users\<FilePath>\appdata\local\programs\python\python36\lib\site-packages (1.1.0)

C:\Users\<FilePath>\AppData\Local\Programs\Python\Python36\Scripts>pip3.6.exe install C:\Users\<FilePath>\Downloads\xlrd-1.1.0-py2.py3-none-any.whl
Requirement already satisfied: xlrd==1.1.0 from file:///C:/Users/<FilePath>/Downloads/xlrd-1.1.0-py2.py3-none-any.whl in c:\users\<FilePath>\appdata\local\programs\python\python36\lib\site-packages (1.1.0)

现在在python代码中,我写的是

import xlrd

出现以下错误:

Traceback (most recent call last):
  File "C:/<FilePath>", line 2, in <module>
    import xlrd
ModuleNotFoundError: No module named 'xlrd'

我想,我正在做一个简单的错误,并试图找出分配,但我没有成功。请帮帮我

1 个答案:

答案 0 :(得分:0)

默认情况下,PyCharm为每个项目创建一个新的virtualenv。添加新依赖项的最简单方法是转到设置 - &gt;项目 - &gt;项目解释器并从那里添加:

PyCharm add package dialog