ImportError: No module named 'xlrd'

后端 未结 12 813
孤城傲影
孤城傲影 2020-12-16 09:29

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

12条回答
  •  眼角桃花
    2020-12-16 09:39

    I have python 2.7, 3.5 and 3.6 in my linux Mint machine for some reasons.

    My spyder uses python 3.5 and I had the same issue. What I have done is

    • go to the folder /usr/local/lib/python2.7/dist-packages
    • Copy the folder xlrd (Note that to do this action you have right click and open as root)
    • Now go to the /usr/local/lib/python3.5/dist-packages or /usr/local/lib/python3.6/dist-packages and paste the folder xlrd over there.

    It worked for me!!!

    This method does not change the default path so that, I can still continue with python 2.7 without any harm(something like SageMath which I use extensively)

提交回复
热议问题