简体   繁体   中英

Error even after installing Xlrd in Python 3.6

I have installed Pip of Xlrd and I am seeing success

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)

Now in python code , i am writing as

import xlrd

Below error is seen :

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

I think, i am doing simple mistake and tried to find out allot but I am not successful . Please help me

By default PyCharm creates a new virtualenv for each project. The easiest way to add a new dependency is to go to settings -> Project -> Project interpreter and add it from there:

PyCharm添加软件包对话框

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM