I am currently using PyCharm with Python version 3.4.3 for this particular project.
This PyCharm previously had Python2.7, and I upgraded to 3.4.3.
I am tryi
If you are in a terminal under Bash or any other semi-advanced shell with tab-completion, try to write pip
followed by <tab>
. If I do it, I see written:
none@vacuum:~$ pip
pip pip3 pip3.5 pip3.6
As you can see, I can choose to run pip commands under pip
only, but I can choose even newer versions of pip. To know what version is associated to the pip
command (with nothing else) run as usual pip
with the --version
or -V
flag. In my case, pip -V
yields:
none@vacuum:~$ pip -V
pip 9.0.1 from /usr/local/lib/python3.6/dist-packages (python 3.6)
Besides this, if you are developing under PyCharm, you may press Alt+Enter
when the cursor is under the module name which cannot be imported to open a context-sensitive floating menu that will allow you to install the module. (You can also manage the list of installed modules for a specific Python version in the settings menu of PyCharm, under the Project Interpreter
sub-menu.)
Click on the Bulb icon right next to the "import xlrd" & click on install package clrd , it will automatically install the package
If you are using a virtual environment use "pipenv install xlrd" instead of "pip install xlrd". That should work.
If you are facing issues in Windows then try the steps below which works for me:
%localappdata%
C:\Users\<YourSystem>\AppData\Local\Programs\Python\Python38-32\Scripts
pip install xlrd
For me the solution was uninstalling xlrd
using pip uninstall xlrd
, and then installing it again using pip install xlrd
.
I had the same problem. I went to the terminal (Using Linux), and typed
sudo pip3 install xlrd
Then I imported xlrd in python and used the same code:
df = pd.read_excel("File.xlsx", "Sheet1")
print (df)
It worked for me!!