[Ironpython-users] No module named datetime

Nicholas Devenish misnomer at gmail.com
Tue Dec 18 13:33:13 CET 2012


Hi Ian,

The default runtime files for IronPython don't include the python standard library - they are installed when you install IronPython development, which is why it works on your development machine.

The solution is to either include the standard library sources, and set up your application to point to them, or compile the standard library into an extra assembly that you distribute with your application, using the pyc tool.

Nick


On 18 Dec 2012, at 12:27, Ian Gorse <unigee at gmail.com> wrote:

> Hi list,
> 
> I'm new to mailing lists so apologise if this is done incorrectly - I
> didn't know how to search the existing archives.
> 
> I am still fairly new to IronPython but managed to pick it up quite
> quickly, however I have come to a stumbling block.
> 
> I have currently developed a C# application that converts data into
> specific file formats. I am using IronPython to handle the conversion
> process which allows me to create new converters and modifiy existing
> ones on the fly without re-complication of the C# application.
> Its wonderful and I couldn't be any happier about it.
> 
> However, its time to run the application in a production environment.
> 
> Once I have my software installed on a test pc (that has no
> developement tools installed), executing the software throws the
> Exception..
> 
> 'No module named datetime'
> 
> And I re-created the error using a simple python script
> 
> import datetime
> now = datetime.datetime.now()
> 
> I guess I could get around it by using he .NET DateTime object but I
> would prefer to use the python datetime if I can.
> 
> What do I need to do to make this work?
> 
> Thanks
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> http://mail.python.org/mailman/listinfo/ironpython-users



More information about the Ironpython-users mailing list