I searched whole 5 pages on google but did not find answer, I have old blender script that I need to run on blender 2.49 but Im getting an error

from os import urandom as _urandom
ImportError: cannot import name urandom

Blender reqire python 2.6 which I have installed and I have confirmation from blender

Compiled with Python version 2.6.2.
Checking for installed Python... got it!

I'm not using virtualenv, so it should not be the issue here.

I did like described here and added "print 42" to end of /usr/lib/python2.6/os.py and I'm getting printed 42 when I run blender and that os.py does not end with definition of urandom, precisely

Does anyone has any suggestion tnx

  • $\begingroup$ Can you import it when running python in the shell? Recall blender 2.49 used python 2.7 $\endgroup$ – batFINGER Dec 8 '19 at 4:22
  • $\begingroup$ No I cant import it in shell. No python 2.49 comes in two verisons python 2.5 and python 2.6 $\endgroup$ – Slobodan Vidovic Dec 8 '19 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.