Visitar URL original
Publish mssql-python as a conda-forge package · Issue #563 · microsoft/mssql-python · GitHub
Skip to content

Publish mssql-python as a conda-forge package #563

Description

Is your feature request related to a problem? Please describe.

Many data science and machine learning workflows rely on conda as the primary package and environment manager. Currently, mssql-python is only available via PyPI, which creates friction for conda-based projects. When a project's dependency tree is managed through conda (e.g. using conda-forge), mixing pip-installed packages can cause environment inconsistencies, dependency conflicts, and reproducibility issues - particularly in regulated or enterprise environments where environment lockfiles and auditable builds are required.

Describe the solution you'd like

It would be great if mssql-python would be available as a conda package on the conda-forge channel (or an alternative channel). This would allow users to install it via conda install -c conda-forge mssql-python. This involves submitting a feedstock recipe to the conda-forge/staged-recipes repository. The recipe would define the package metadata, source (pointing to the PyPI release or source tarball), build requirements, and runtime dependencies - following the standard conda-forge contribution process. Ideally the conda package would be kept in sync with PyPI releases so that both channels remain up to date.

Describe alternatives you've considered

  • Using pip inside a conda environment: this is the current workaround, but it undermines the integrity of conda environment solves and is discouraged in environments where full conda-managed reproducibility is required.
  • Self-hosting a conda package: it is possible to build a local conda package from the PyPI source using conda build. However, this places a maintenance burden on end-users and is not a scalable or shareable solution.

Additional context

The conda-forge contribution process is well-documented and community-supported. The grayskull tool can auto-generate an initial feedstock recipe directly from the PyPI package metadata, which significantly reduces the effort required: grayskull pypi mssql-python. Many comparable database drivers (e.g. pyodbc, psycopg2) are already available on conda-forge.

Activity

  1. github-actions commented on May 11, 2026

    @github-actions

    Hi Martin Studer (@martinstuder), thank you for opening this issue!

    Our team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.

    If you have additional information to share, please feel free to update the issue.

    Thank you for your patience!

  2. sumitmsft commented on Jun 5, 2026

    @sumitmsft
    Contributor

    Hello Martin Studer (@martinstuder)

    Thanks for your suggestions.

    Publishing mssql-python on Conda package manager is on our roadmap and the work on it will start this month. Please stay tuned and we will update this space once we are ready to publish the package on Conda.

    Sumit

  3. oscarrobertson commented on Aug 7, 2026

    @oscarrobertson

    Sumit Sarabhai (@sumitmsft) any progress on this?

    A concrete data point for this request: I'm on RHEL 9, managing a conda env using pixi (and installing this lib via pypi-dependencies), some of the changes around splitting out the odbc driver now make this more challenging. The pip wheel fails to load in conda environments that contain conda-forge krb5 (which is common — libcurl, pyarrow etc. pull it in transitively).

    With mssql-python 1.13.0, connecting fails with the generic DDBC Error: Failed to load the driver. The underlying dlopen error is:

    OSError: /lib64/libkrb5.so.3: undefined symbol: krb5int_push_fscreatecon_for, version krb5support_0_MIT

    The driver expects the system krb5, but in a conda env the loader ends up mixing system and conda-forge krb5 libraries in the same process, and the two aren't symbol-compatible. Whether it breaks depends on which krb5 the env happens to contain, so it comes and goes with unrelated lockfile changes.

    Current workarounds: LD_LIBRARY_PATH=$CONDA_PREFIX/lib, or preloading the conda krb5 libs with ctypes.CDLL(..., RTLD_GLOBAL) before importing mssql_python. Neither is something we'd want to ship.

    Two notes for whoever picks this up:

    1. The conda-forge build would need the native driver linked against conda-forge krb5/OpenSSL with conda rpaths. A grayskull-style repackage of the wheel would carry the same system linkage and fail the same way. Since the
      driver now ships separately as mssql-python-odbc, it could become its own conda package.
    2. Unrelated to conda: it would help a lot if the "Failed to load the driver" message included the dlopen error text — the raw OSError points straight at the cause.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: packaging-platformWheels, version support, OS/arch coverage (Linux/macOS/Windows), install or import failures.enhancementNew feature or requesttriage doneIssues that are triaged by dev team and are in investigation.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions