ImportError: No module named fractions

I’m trying to use Fraction module, but I get “ImportError: No module named fractions”.
In IronPython console, everything is fine, but in Dynamo Python Script is throwing this error.
Anybody ran into this issue?
(running version 0.9.2.4472)
Thanks.

Hi @Adrian_Crisan
You have to add the default ironpython library to the interpreter’s path.
Not sure why it’s not added by default (maybe @Dimitar_Venkov can shed some light?), but this should work:

1 Like

I would imagine it’s because less than 5% of the users would really need to use the core python libraries. Half of those should be able to figure out how to do it on their own and at least one of them would share the answer with the rest? :smiley:

But if you think that the initial script should be tweaked, do not hesitate to file a PR on GitHub. The code that contains the initial script can be found here.

2 Likes