{"id":8623,"library":"scikit-misc","title":"scikit-misc","description":"scikit-misc is a Python library providing a collection of miscellaneous tools for data analysis and scientific computing. It includes algorithms that were once part of SciPy's `scipy.misc` module but were removed or deemed unstable, now offered in a more robust form. The library is currently at version 0.5.2 and maintains an active development and release cadence, requiring Python >=3.10.","status":"active","version":"0.5.2","language":"python","source_language":"en","source_url":"https://github.com/has2k1/scikit-misc","tags":["scientific computing","data analysis","loess","smoothing","scipy-replacement"],"install":[{"cmd":"pip install scikit-misc","lang":"bash","label":"Recommended via pip"},{"cmd":"conda install conda-forge::scikit-misc","lang":"bash","label":"Recommended via Conda"}],"dependencies":[{"reason":"Fundamental for numerical operations; often a build dependency.","package":"numpy","optional":false},{"reason":"Often used alongside SciPy; contains algorithms complementary to SciPy's core.","package":"scipy","optional":false}],"imports":[{"symbol":"loess","correct":"from skmisc.loess import loess"}],"quickstart":{"code":"import numpy as np\nfrom skmisc.loess import loess\n\n# Generate some sample data\nx = np.linspace(0, 10, 100)\ny = np.sin(x) + np.random.normal(0, 0.5, 100)\n\n# Fit a LOESS model\nmodel = loess(x, y)\nmodel.fit()\n\n# Get smoothed predictions and statistics\npred = model.predict(x).values\n\nprint(f\"First 5 original y values: {y[:5]}\")\nprint(f\"First 5 smoothed y values: {pred[:5]}\")","lang":"python","description":"This example demonstrates how to use the `loess` function from `skmisc.loess` to perform locally-weighted regression on a sample dataset, generating smoothed predictions."},"warnings":[{"fix":"Ensure `pip install scikit-misc` or `conda install conda-forge::scikit-misc` is run within the *correct* active Python environment. If using Jupyter, ensure the kernel points to this environment. Sometimes, reinstalling with `--user` or explicitly managing `PYTHONPATH` might be necessary.","message":"Users often encounter 'ModuleNotFoundError' even after installation, particularly in complex environments like Anaconda or when using different Python interpreters.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update imports to `from skmisc.some_module import function` or use alternative functions within modern SciPy modules.","message":"Older SciPy users might recall algorithms (e.g., `scipy.misc.face`, `scipy.misc.ascent`) that were deprecated or removed from `scipy.misc`. `scikit-misc` aims to re-introduce some of these or similar functionalities, but direct `scipy.misc` imports will no longer work and require migrating to `scikit-misc` or other SciPy submodules.","severity":"breaking","affected_versions":"Prior to scikit-misc's existence / SciPy versions that removed `scipy.misc`"},{"fix":"Use official pre-built wheels (`pip install scikit-misc`) whenever possible. For build failures, ensure `numpy` is installed as a build dependency, and check the GitHub issues for specific patches or workarounds related to your Python/Numpy version. Recent commits have addressed Python >= 3.12 and Numpy 2.0 compatibility.","message":"Building `scikit-misc` from source, especially on less common platforms or with pre-release Python versions (e.g., Python 3.13, or sometimes on Windows), can lead to compilation errors due to dependencies on Fortran/C/Cython code and build system interactions with `numpy`.","severity":"gotcha","affected_versions":"All versions (especially when building from source or with new Python/Numpy versions)"}],"env_vars":null,"search_vec":"'0.5.2':54 '3.10':65 'activ':58 'algorithm':25 'analysi':19,69 'cadenc':62 'collect':13 'comput':22,67 'current':51 'data':18,68 'deem':39 'develop':59 'form':47 'includ':24 'librari':10,49 'loess':70 'maintain':56 'misc':3,6 'miscellan':15 'modul':34 'offer':42 'part':29 'provid':11 'python':9,64 'releas':61 'remov':37 'replac':74 'requir':63 'robust':46 'scientif':21,66 'scikit':2,5 'scikit-misc':1,4 'scipi':31,73 'scipy-replac':72 'scipy.misc':33 'smooth':71 'tool':16 'unstabl':40 'version':53","created_at":"2026-04-16T17:03:08.526091+00:00","updated_at":"2026-04-16T17:03:08.526091+00:00","problems":[{"fix":"Run `pip install scikit-misc` or `conda install conda-forge::scikit-misc` in your active environment. Verify the environment is correctly activated.","cause":"The `scikit-misc` package is either not installed or not installed in the Python environment currently in use.","error":"ModuleNotFoundError: No module named 'scikit-misc'"},{"fix":"Confirm `scikit-misc` is installed in the *same* Python environment where the calling library is installed and being executed. Reinstalling `scikit-misc` with `pip install --user scikit-misc --force` or ensuring the correct `PYTHONPATH` can sometimes resolve this.","cause":"This error typically occurs when another library (e.g., `plotnine` or `scanpy`) tries to use `skmisc.loess` but cannot find the installed `scikit-misc` package in the execution environment.","error":"For loess smoothing, install 'scikit-misc'"},{"fix":"This issue has been addressed in recent `scikit-misc` commits. Ensure you are using the latest version of `scikit-misc`. If building from source, ensure `numpy` is correctly installed in your build environment. Prefer installing pre-built wheels if available.","cause":"This is a build-time error, often related to `meson-python` failing to find `numpy` headers during compilation, particularly with newer Python versions (e.g., 3.13) where build dependencies might not be automatically linked.","error":"ERROR: Command `/usr/bin/python3 -c 'import os os.chdir(os.path.join(\"..\", \"tools\")) import numpy as np try: incdir = os.path.relpath(np.get_include()) except Exception: incdir = np.get_include() print(incdir) '` failed with status 1."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.5.2","cli_name":"","cli_version":null,"type":"library","homepage":"https://has2k1.github.io/scikit-misc/stable","github":"https://github.com/has2k1/scikit-misc","docs":"https://has2k1.github.io/scikit-misc/stable","changelog":"https://has2k1.github.io/scikit-misc/stable/changelog.html","pypi":"https://pypi.org/project/scikit-misc/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}