views:

1295

answers:

3

I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up python-dateutil which should do exactly what I need.

The problem is that I need to install it on Windows. I was able to upack the .tar.gz2 distribution using 7-zip, but now I'm left with a collection of files and no guidance on how to proceed. When I try to run setup.py I get the error "No module named setuptools".

+3  A: 

Looks like the setup.py uses easy_install (i.e. setuptools). Just install the setuptools package and you will be all set.

To install setuptools in Python 2.6, see the answer to this question.

jcoon
Any chance that the 2.5 version will work on 2.6?
Mark Ransom
I've answered my own question - no, setuptools won't install unless it finds the specific version of Python it has been built for. I'll need some other method.
Mark Ransom
You should be able to... see the link I posted in the answer.
jcoon
Thanks for everything. I gave you an upvote, even though I didn't use setuptools in the end.
Mark Ransom
+3  A: 

Why didn't someone tell me I was being a total noob? All I had to do was copy the dateutil directory to someplace in my Python path, and it was good to go.

Mark Ransom
A: 

Using setup from distutils.core instead of setuptools in setup.py worked for me, too:

#from setuptools import setup
from distutils.core import setup
Chris Ostler