[Tutor] openpyxl module not recognized

Sarfraaz Ahmed sarfraaz at gmail.com
Wed Jan 8 00:36:12 EST 2020


Hello Casey,

Am taking a wild guess and assuming that you are executing your code from
some sort of an editor or some such and may be that editor is not picking
the right version of Python. If that is really the case, then I found a
comment on stackoverflow that talks about solving it.

The relevant comment for your scenario : "check your python version first,
then refer to this answer :
https://stackoverflow.com/questions/23161604/how-to-set-which-version-of-python-sublime-text-uses
"

The original question :
https://stackoverflow.com/questions/44223621/no-module-named-openpyxl-python-3-6-osx

Hope that helps.

On Tue, Jan 7, 2020 at 4:35 PM Casey McGonigle <cmcgon at berkeley.edu> wrote:

> Hello,
>
> I'm working on a project using pandas DataFrames that I'd like to export to
> excel. I'm using Mac OS Mojave. I understand the way to do this is through
> the df.to_excel() function, which requires the openpyxl module.
>
> As such, I've installed the module (using pip install openpyxl) -- my
> terminal tells me it was successfully installed and it shows up in my
> finder.
>
> However, when I run the df.to_excel("excel file") function, I get a
> ModuleNotFoundError: No module named 'openpyxl'.
>
> Please advise how to remedy this incongruity
>
> --
> UC Berkeley
> Class of 2021
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


-- 
        Thanks
               -- Sarfraaz Ahmed


More information about the Tutor mailing list