{"id":45434,"library":"mkl-random","title":"mkl-random","description":"NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality. Provides high-performance random number generation backed by Intel MKL. Current version 1.4.1, supporting Python 3.10-3.14. Release cadence is irregular.","status":"active","version":"1.4.1","language":"python","source_language":"en","source_url":"http://github.com/IntelPython/mkl_random","tags":["mkl","random","intel","numpy","high-performance"],"install":[{"cmd":"pip install mkl-random","lang":"bash","label":"PyPI install"},{"cmd":"conda install -c intel mkl-random","lang":"bash","label":"Conda install (recommended for Intel MKL)"}],"dependencies":[{"reason":"Required for array handling and compatibility with NumPy's random module","package":"numpy","optional":false},{"reason":"Intel MKL runtime library; must be separately installed or provided via conda","package":"mkl","optional":false}],"imports":[{"note":"Star import discouraged due to namespace overlap with numpy.random","wrong":"from mkl_random import *","symbol":"mkl_random","correct":"import mkl_random"},{"note":"numpy.random.beta may not use MKL; explicit import from mkl_random ensures MKL backend","wrong":"from numpy.random import beta","symbol":"mkl_random.beta","correct":"from mkl_random import beta"}],"quickstart":{"code":"import mkl_random\nimport os\n\n# Set random seed for reproducibility\nmkl_random.seed(42)\n\n# Generate random numbers\nrng = mkl_random.RandomState(seed=42)\nsamples = rng.rand(10)\nprint(samples)","lang":"python","description":"Quickstart: import mkl_random, seed, and generate random samples using the MKL backend."},"warnings":[{"fix":"Upgrade Python to 3.10+ and reinstall mkl-random.","message":"mkl_random 1.4.0+ drops support for Python <3.10. Upgrade Python to 3.10+ if you were using an older version.","severity":"breaking","affected_versions":"1.4.0+"},{"fix":"Use mkl_random.seed() for MKL-based generators and numpy.random.seed() for numpy backend if needed.","message":"mkl_random.seed() does not affect numpy.random unless you call numpy.random.seed() separately. They operate independently.","severity":"gotcha","affected_versions":"all"},{"fix":"Avoid star import; use import mkl_random and then mkl_random.normal(...).","message":"Using from mkl_random import * may silently overwrite numpy.random functions because mkl_random exports names like 'normal', 'rand', etc.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'-3.14':34 '1.4.1':30 '3.10':33 'back':24 'base':6 'cadenc':36 'current':28 'function':16 'generat':15,23 'high':19,44 'high-perform':18,43 'intel':10,26,41 'interfac':8 'irregular':38 'mkl':2,12,27,39 'mkl-random':1 'number':14,22 'numpi':5,42 'numpy-bas':4 'perform':20,45 'provid':17 'python':7,32 'r':11 'random':3,13,21,40 'releas':35 'support':31 'version':29","created_at":"2026-06-07T12:54:59.445673+00:00","updated_at":"2026-06-07T12:54:59.445673+00:00","problems":[{"fix":"Run 'pip install mkl-random' or 'conda install -c intel mkl-random'.","cause":"mkl_random is not installed in the current environment.","error":"ModuleNotFoundError: No module named 'mkl_random'"},{"fix":"Install the Intel MKL library via conda ('conda install mkl') or download from Intel's website. On Linux, set LD_LIBRARY_PATH to MKL library directory.","cause":"Intel MKL runtime (mkl_rt.dll / libmkl_rt.so) is missing from the system or Python path.","error":"ImportError: DLL load failed: The specified module could not be found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"http://github.com/IntelPython/mkl_random","github":"http://github.com/IntelPython/mkl_random","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}