ImportError: no module named xlsxwriter

I recently downloaded xlsxwriter version 0.6.4 and installed it on my computer. He correctly added it to my C:\Python27\Lib\site-packages\xlsxwriter , however, when I try to import it, I get an ImportError: No module named xlsxwriter. error message ImportError: No module named xlsxwriter. The return path is the File "F:\Working\ArcGIS\ArcGIS .py\Scripts\Append_Geodatabase.py".

However, if I try to import numpy (I can’t remember what numby is, however it is in the same folder with site packages C:\Python27\Lib\site-packages\numpy) , it has no problems.

Any ideas what might be causing this problem?

Thanks for the help.

+13
source share
5 answers

Even if it seems that the module is installed, then with regard to Python, this is not so, since it throws this exception.

Try installing the module again using one of the installation methods shown in the XlsxWriter documentation and find all the installation errors.

If not, run an example program similar to the following:

 import xlsxwriter workbook = xlsxwriter.Workbook('hello.xlsx') worksheet = workbook.add_worksheet() worksheet.write('A1', 'Hello world') workbook.close() 
+11
source

Here are some simple ways to get you to work with the XlsxWriter module. The first step is to install the XlsxWriter module. The easiest way to install Python modules from PyPI is the Python index:

 sudo pip install xlsxwriter 

Note

Windows users can omit sudo at the beginning of the command.

+15
source

I have the same problem. The problem seems to be the problem. Try

 pip uninstall xlsxwriter easy_install xlsxwriter 
+9
source

I managed to solve this problem as follows ...

Be careful, make sure you understand the IDE you are using! - Because I did not. I tried to import xlsxwriter using PyCharm and returned this error.

If you have already tried installing pip (sudo pip install xlsxwriter) through the cmd prompt, try using a different IDE, for example Geany - & import xlsxwriter.

I tried this and Jani imported the library perfectly. I opened PyCharm and went to "File> Settings> Project:> Project Interpreter" xlslwriter, although intriguingly I could not import it! I double-clicked xlsxwriter and clicked "Install Package" ... And that’s it! It worked!

Hope this helps ...

+3
source

I'm not sure what caused this, but everything went well as soon as I changed the path name from Lib to Lib , and I was finally able to get it working.

+1
source

Source: https://habr.com/ru/post/979341/


All Articles