problem with import in python 2.2.3

A

Anthony Irwin

Hi,

I have written a python script that works perfectly in python 2.4.4
and python 2.4.3 but when I try to use the same script on an older
system with python 2.2.3 I get the following error.

../backup_all_mysql_databases.py
Traceback (most recent call last):
File "./backup_all_mysql_databases.py", line 5, in ?
from datetime import date
ImportError: No module named datetime

Does anyone know why the datetime module is not being found in python
2.2.3 and how I can make the script work in the older version of python?

--
Kind Regards,
Anthony Irwin

http://www.irwinresources.com
http://www.makehomebusiness.com
email: anthony at above domains, - www.
 
G

Gabriel Genellina

En Thu, 17 May 2007 00:37:26 -0300, Anthony Irwin
./backup_all_mysql_databases.py
Traceback (most recent call last):
File "./backup_all_mysql_databases.py", line 5, in ?
from datetime import date
ImportError: No module named datetime

Does anyone know why the datetime module is not being found in python
2.2.3 and how I can make the script work in the older version of python?

datetime is included on 2.3 and above.
Try copying the 2.3 version on your 2.2 installation, maybe it Just
Works...
 
S

Simon Brunning

Does anyone know why the datetime module is not being found in python
2.2.3 and how I can make the script work in the older version of python?

The datetime modules was added in Python 2.3 - that's why you aren't
finding it. This might help - http://tinyurl.com/37677u - but I've not
tried it myself.

--
Cheers,
Simon B.
(e-mail address removed)
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

python import error 7
Cannot import cookies 0
unable to import rlcompleter readline 0
Python battle game help 2
import problem 5
Python discord bot problem 1
import newer 0
Problem with KMKfw libraries 1

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top