I am trying to find a temp directory , but when i am trying to get the directory using
tempfile.gettempdir()
it\'s giving me error of
I had the same issue on the Windows 7x64 machine. It was OK with disk space and permissions.
When I excecuted
tempfile.mkdtemp(prefix='MyPrefix_')
manually in python console the directory %TEMP%\MyPrefix_xxxx was successfully created.
But when I did the same from script I received the error IOError: [Errno 2] No usable temporary directory found in [...].
I solved the problem using dir parameter:
# '.' is a default value for example
tempfile.mkdtemp(prefix='MyPrefix_', dir=os.environ.get('TEMP', '.'))
After that from script it worked well.