We can fix No module named xlsxwriter error by reinstalling the xlsxwriter module. Sometimes this error generates because of incompatibility. In case of incompatibility versioning, We need to remove/ uninstall the xlsxwriter module and reinstall the compatible version of it. In this article, we will explore various methods to fix this error.
No module named xlsxwriter –
Let’s see different ways of installing the xlsxwriter module. The successful installation for xlsxwriter, will automatically fix this error.
Firstly, We will cover the most adapted way. That is pip package manager. Simple we need to run the below command.
pip install xlsxwriter
sudo pip install xlsxwriter
Sudo provides the admin rights in Linux based OS. Also of windows is asking for admin right while using the above command. Then we need to open the cmd as administrator.
We can also use easy_install package manger in the place of pip as the above section. Please refer the below easy_install statement for fixing the bug.
Here, We will use the source code for installation. We can use git tool with the below commands.
$ git clone https://github.com/jmcnamara/XlsxWriter.git $ cd XlsxWriter $ python setup.py install
If we do want to use the git tool, We can use the only terminal with CURL command. Let’s see how can we do the installation using CURL.
$ curl -O -L http://github.com/jmcnamara/XlsxWriter/archive/master.tar.gz $ tar zxvf master.tar.gz $ cd XlsxWriter-master/ $ python setup.py install
It will use the master branch which contains the most stable code in the repository. CURL will basically download the tar file from the URL. Then it will untar it and change the directory to call the setup.py install command.
No module named xlsxwriter error is very common. We can easily fix this error by following any of the above methods. Still if you are stuck and not able to fix this error, please comment below in the comment box. Data Science Learner Team must help you.
Similar Articles :
Data Science Learner Team
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.