Skip to content Skip to sidebar Skip to footer

Anaconda Did Not Install Packages Openpyxl And Xlrd

After installing a new Python 3.6 environment with pandas, numpy, etc. when I tried to use the following pandas method I got the following errors: >>> df.to_excel(filename

Solution 1:

Yes, this is intentional. If you read the Optional Dependencies section of the Pandas documentation, you can see that Excel I/O is included in there.

A couple arguments I can think of for why this is a good thing:

  1. There are so many features incorporated into Pandas that including everything by default would really bloat installs.
  2. There are multiple compatible alternatives for Excel I/O, so it may not be fair to impose a particular choice on people, especially if they already have one installed for another dependency.

However, I do think the error handling here could be improved. For example, it would have been better to provide a message saying that this functionality isn't available without one of the packages, rather than hitting a hard ModuleNotFoundError.

Solution 2:

FYI, in my case the problem was not solved by Conda install for the missing dependency package, it was solved by pip install...pip install xlrd.

Post a Comment for "Anaconda Did Not Install Packages Openpyxl And Xlrd"