I am using Python 2.7 and trying to use dateutil
as follows:
from dateutil import parser as _date_parser
However, I get the following error:
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
from dateutil import parser as _date_parser
File "C:\Python27\Lib\dateutil\parser.py", line 24, in <module>
from six import text_type, binary_type, integer_types
ImportError: No module named six
Could you please let me know what is the six
module for and how to get it installed in a Windows 7 machine?
Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions.
here's what six is:
pip search six
six - Python 2 and 3 compatibility utilities
to install:
pip install six
though if you did install python-dateutil
from pip six should have been set as a dependency.
N.B.: to install pip run easy_install pip
from command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With