Reputation: 19
I am running a k-means cluster analysis in python and am getting a warning.
UserWarning: KMeans is known to have a memory leak on Windows with MKL, when there are less chunks than available threads. You can avoid it by setting the environment variable OMP_NUM_THREADS=1.
I have tried to set the environ variable
import os
os.environ["OMP_NUM_THREADS"] = '1'
But the warnings don't go away, and it looks like the variable is not persistent (when i restart python, it's not there anymore) which got me searching through stackoverflow and found the following sites
Bear in mind I am on the work PC and I have no admin rights. So my question are:
Since I am beginning to use python extensively and other modules with similar issues, I would like to tackle this problem sooner than later.
Thanks, Jung
Upvotes: 0
Views: 23
Reputation: 33
You don't need admin rights to set user environment variables. Type 'env' into your start menu and look for a 'Edit environment variables for your account'. Add it in there. You will need to restart your shell/IDE/platform to make it available.
Upvotes: -1