Search code examples
pythonmacosxlrd

Python 3.4 pip install


I am trying to install the xlrd module on my Mac, however when I open IDLE and import the xlrd module, I get the error:

Input Error: No module named xlrd

To install it, I used in my home directory...

sudo pip install xlrd 

... and it is installed successfully.

Note that I have both Python 2.7 and Python 3.4.0 on my computer, in case this is what is causing problems. I want it installed for Python 3.4.0.


Solution

  • To avoid conflicts between parallel Python 2 and Python 3 installations, only the versioned pip3 and pip3.4 commands are bootstrapped by default

    You can try sudo pip3 install xlrd or sudo pip3.4 install xlrd to use the Python 3.4, see docs here https://docs.python.org/3/whatsnew/3.4.html#bootstrapping-pip-by-default