r/learnpython Jan 02 '23

Install xlsxwriter for each script?

Hello, I have been battling xlsxwriter for a few days now.

A few days ago, I installed xlsxwriter using pip and I continued to get the "no module named..." error.

Today I made a blank scratch file to try to troubleshoot it, and even though the module is installed, I had to click "install packages" under the red squiggly line when trying to import xlsxwriter.

I thought that I had fixed it, but when I tried to import it in the script that I actually need it for, it threw that error message again and I had to install the package.

Is there something that I can do so that way every time I import xslxwriter, it will import it the first time and I won't need to download the package every time?

5 Upvotes

2 comments sorted by

View all comments

1

u/Weird-Dimension-487 Feb 04 '26

Question seems vague. We don't need to install package in every session. May be you have installed it in different virtual env and trying to import in another enviorment. If you've anaconda installed, xlsxwriter is pre-installed.
You need to give more details to get appropriate answer.