How to convert CSV to XLSX using Python 3.5? Pandas and XlsxWriter don't work with this version..
Asked
Active
Viewed 132 times
1
-
Don't use that version. It [reached End Of Life 2 years ago](https://devguide.python.org/versions/). That means maintainers don't have to support it any more. If you insist on using it you'll have to install older Pandas versions that support it – Panagiotis Kanavos Jan 10 '23 at 17:58
-
Out of curiosity, why stuck with 3.5? – Tsingis Jan 10 '23 at 18:01
-
All xlsxwriter versions up to [3.0.3](https://pypi.org/project/XlsxWriter/3.0.3/) support Python 3.5. Pandas dropped support in version 1.0 though. You really need to use a supported Python version. – Panagiotis Kanavos Jan 10 '23 at 18:07
-
hi all! I would love to update the version but all our servers are running python 3.5... – Alex_Borovskii Jan 11 '23 at 05:04
-
@PanagiotisKanavos, Hey! Thanks for the help. On my python3 this module was for python2: XlsxWriter (2.0.0) this is where the problem starts – Alex_Borovskii Jan 11 '23 at 08:54
-
Move to a supported Python version then. Python 2 isn't supported. Neither is 3.5. – Panagiotis Kanavos Jan 11 '23 at 08:57
-
@PanagiotisKanavos , I correctly understood that XlsxWriter (2.0.0) will not work on my version of python 3.5? – Alex_Borovskii Jan 11 '23 at 09:27
-
@PanagiotisKanavos, please tell me where can I download the version of XlsxWriter (3.0.3)? – Alex_Borovskii Jan 11 '23 at 09:29
-
You don't download Python packages, you install them with `pip`. – Panagiotis Kanavos Jan 11 '23 at 09:40
2 Answers
1
All xlsxwriter versions up to 3.0.3 support Python 3.5.
Install for Python 3.5 example :
sudo -H python3 -m pip install --index-url https://test.pypi.org/simple XlsxWriter==3.0.3

Alex_Borovskii
- 27
- 7
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 11 '23 at 15:59
1
In addition to the hint from @Alex_Borovskii on specifying the xlsxwriter version that you require I also wanted to point out that pip will/should figure out the latest version it is compatible with.
For example pip with Python 3.5 chooses xlsxwriter==3.0.3 even though there are newer (incompatible) versions available:
$ /test/Python-3.5.0/bin/pip install xlsxwriter
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020.
Please upgrade your Python as Python 3.5 is no longer maintained.
pip 21.0 will drop support for Python 3.5 in January 2021.
pip 21.0 will remove support for this functionality.
Collecting xlsxwriter
Downloading XlsxWriter-3.0.3-py3-none-any.whl (149 kB)
|████████████████████████████████| 149 kB 11.1 MB/s
Installing collected packages: xlsxwriter
Successfully installed xlsxwriter-3.0.3
This should work back to Python 2.7 (and probably earlier). I structured/tested this when I started dropping support in XlsxWriter for deprecated Python versions.

jmcnamara
- 38,196
- 6
- 90
- 108
-
Hey! Thanks for the answer! I think this information will be useful for many! ) – Alex_Borovskii Jan 11 '23 at 16:09