[Python] how to recover from error "Cannot mix incompatible Qt library (6.8.3) with this...

Discussão em 'Python' iniciado por Stack, Abril 10, 2025.

  1. Stack

    Stack Membro Participativo

    I am using a conda virtual environment. I ran my code yesterday and it worked perfectly fine.

    I changed NOTHING in my code. I changed NOTHING in my virtual environment.

    Now I run the code again and get the following error: Process finished with exit code -1073740791 (0xC0000409)

    Ok, for example here I found out, I can just try to run the command for executing the Python script from console (I usually run the code from Pycharm).

    In the external console I get the following error: Cannot mix incompatible Qt library (6.8.3) with this library (6.8.2)

    I don't understand this, how can something break that worked perfectly the day before? I figured out, it has to do with matplotlib.

    Minimum code for reproducing the error:

    from matplotlib import pyplot as plt

    plt.plot([1,2,3], [2,3,1])
    plt.show()


    That is what my virtual environment looks like, when I run conda list:

    _openmp_mutex 4.5 2_gnu conda-forge
    ampl-asl 1.0.0 he0c23c2_2 conda-forge
    brotli-python 1.0.9 py312h5da7b33_9
    bzip2 1.0.8 h2466b09_7 conda-forge
    ca-certificates 2025.2.25 haa95532_0
    cairo 1.18.4 h5782bbf_0 conda-forge
    colorama 0.4.6 pyhd8ed1ab_1 conda-forge
    contourpy 1.3.1 py312h214f63a_0
    cycler 0.11.0 pyhd3eb1b0_0
    deepdiff 8.1.1 pyhd8ed1ab_0 conda-forge
    double-conversion 3.3.1 he0c23c2_0 conda-forge
    font-ttf-dejavu-sans-mono 2.37 hd3eb1b0_0
    font-ttf-inconsolata 2.001 hcb22688_0
    font-ttf-source-code-pro 2.030 hd3eb1b0_0
    font-ttf-ubuntu 0.83 h8b1ccd4_0
    fontconfig 2.15.0 h765892d_1 conda-forge
    fonts-anaconda 1 h8fa9717_0
    fonts-conda-ecosystem 1 hd3eb1b0_0
    fonttools 4.55.3 py312h827c3e9_0
    freetype 2.13.3 h0b5ce68_0 conda-forge
    geojson 3.2.0 pyhd8ed1ab_0 conda-forge
    graphite2 1.3.14 hd77b12b_1
    harfbuzz 10.4.0 h9e37d49_0 conda-forge
    icu 75.1 he0c23c2_0 conda-forge
    intel-openmp 2024.2.1 h57928b3_1083 conda-forge
    ipopt 3.14.17 h905d1ba_0 conda-forge
    kiwisolver 1.4.8 py312h5da7b33_0
    krb5 1.21.3 hdf4eb48_0 conda-forge
    lcms2 2.17 hbcf6048_0 conda-forge
    lerc 4.0.0 h5da7b33_0
    libblas 3.9.0 26_win64_mkl conda-forge
    libcblas 3.9.0 26_win64_mkl conda-forge
    libclang13 20.1.1 default_ha5278ca_0 conda-forge
    libdeflate 1.23 h9062f6e_0 conda-forge
    libexpat 2.6.4 he0c23c2_0 conda-forge
    libffi 3.4.2 h8ffe710_5 conda-forge
    libflang 5.0.0 h6538335_20180525 conda-forge
    libgcc 14.2.0 h1383e82_2 conda-forge
    libglib 2.82.2 h7025463_1 conda-forge
    libgomp 14.2.0 h1383e82_2 conda-forge
    libhwloc 2.11.2 default_ha69328c_1001 conda-forge
    libiconv 1.17 hcfcfb64_2 conda-forge
    libintl 0.22.5 h5728263_3 conda-forge
    libjpeg-turbo 3.0.3 h827c3e9_0
    liblapack 3.9.0 26_win64_mkl conda-forge
    liblzma 5.6.3 h2466b09_1 conda-forge
    libpng 1.6.47 had7236b_0 conda-forge
    libsqlite 3.48.0 h67fdade_1 conda-forge
    libtiff 4.7.0 h797046b_3 conda-forge
    libwebp-base 1.5.0 h3b0e114_0 conda-forge
    libwinpthread 12.0.0.r4.gg4f2fc60ca h57928b3_9 conda-forge
    libxcb 1.17.0 h0e4246c_0 conda-forge
    libxml2 2.13.5 he286e8c_1 conda-forge
    libxslt 1.1.41 h0739af5_0
    libzlib 1.3.1 h2466b09_2 conda-forge
    llvm-meta 5.0.0 0 conda-forge
    llvmlite 0.44.0 py312h1f7db74_1 conda-forge
    lxml 5.3.1 py312h53bce91_0 conda-forge
    matplotlib 3.10.1 py312h2e8e312_0 conda-forge
    matplotlib-base 3.10.1 py312h90004f6_0 conda-forge
    mkl 2024.2.2 h66d3029_15 conda-forge
    mumps-seq 5.7.3 h7c2359a_6 conda-forge
    networkx 3.4.2 pyh267e887_2 conda-forge
    numba 0.61.0 py312hcccf92d_1 conda-forge
    numpy 2.1.3 py312h49bc9c5_0 conda-forge
    openjpeg 2.5.3 h4d64b90_0 conda-forge
    openmp 5.0.0 vc14_1 conda-forge
    openssl 3.4.0 ha4e3fda_1 conda-forge
    orderly-set 5.2.3 pyh29332c3_1 conda-forge
    packaging 24.2 pyhd8ed1ab_2 conda-forge
    pandapower 3.0.0 pyhd8ed1ab_0 conda-forge
    pandas 2.2.3 py312h72972c8_1 conda-forge
    pcre2 10.44 h3d7b363_2 conda-forge
    pillow 11.1.0 py312h078707f_0 conda-forge
    pip 25.0 pyh8b19718_0 conda-forge
    pixman 0.44.2 had0cd8c_0 conda-forge
    ply 3.11 pyhd8ed1ab_3 conda-forge
    pthread-stubs 0.3 h3c9f919_1
    pyomo 6.8.2 py312h275cf98_1 conda-forge
    pyparsing 3.2.0 py312haa95532_0
    pyside6 6.8.2 py312h2ee7485_0 conda-forge
    python 3.12.8 h3f84c4b_1_cpython conda-forge
    python-dateutil 2.9.0.post0 pyhff2d567_1 conda-forge
    python-tzdata 2025.1 pyhd8ed1ab_0 conda-forge
    python_abi 3.12 5_cp312 conda-forge
    pytz 2024.1 pyhd8ed1ab_0 conda-forge
    qhull 2020.2 h59b6b97_2
    qt6-main 6.8.2 h1259614_0 conda-forge
    scipy 1.13.1 py312h1f4e10d_0 conda-forge
    setuptools 75.8.0 pyhff2d567_0 conda-forge
    six 1.17.0 pyhd8ed1ab_0 conda-forge
    tbb 2021.13.0 h62715c5_1 conda-forge
    tk 8.6.13 h5226925_1 conda-forge
    tornado 6.4.2 py312h827c3e9_0
    tqdm 4.67.1 pyhd8ed1ab_1 conda-forge
    typing_extensions 4.12.2 py312haa95532_0
    tzdata 2025a h78e105d_0 conda-forge
    ucrt 10.0.22621.0 h57928b3_1 conda-forge
    unicodedata2 15.1.0 py312h827c3e9_1
    vc 14.3 h5fd82a7_24 conda-forge
    vc14_runtime 14.42.34433 h6356254_24 conda-forge
    vs2015_runtime 14.42.34433 hfef2bbc_24 conda-forge
    wheel 0.45.1 pyhd8ed1ab_1 conda-forge
    xorg-libxau 1.0.12 h0e40799_0 conda-forge
    xorg-libxdmcp 1.1.5 h0e40799_0 conda-forge
    zstd 1.5.7 hbeecb71_2 conda-forge


    Now when I try to upgrade the mentioned "Qt library" (I guess they mean "qt6-main"?) using conda install qt6-main=6.8.3, I get the following error:

    LibMambaUnsatisfiableError: Encountered problems while solving:
    - package qt6-main-6.8.3-h1259614_0 requires libsqlite >=3.49.1,<4.0a0, but none of the providers can be installed

    Could not solve for environment specs
    The following packages are incompatible
    ├─ libsqlite 3.48.0.* is requested and can be installed;
    └─ qt6-main 6.8.3* is not installable because it requires
    └─ libsqlite >=3.49.1,<4.0a0 , which conflicts with any installable versions previously reported.


    My next guess was to try to downgrade matplotlib using conda install matplotlib=3.9, where I get the following error:

    LibMambaUnsatisfiableError: Encountered problems while solving:
    - package matplotlib-base-3.10.1-py310h37e0a56_0 requires python >=3.10,<3.11.0a0, but none of the providers can be id

    Could not solve for environment specs
    The following packages are incompatible
    ├─ matplotlib-base 3.10.1.* is installable with the potential options
    │ ├─ matplotlib-base 3.10.1, which can be installed;
    │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4] would require
    │ │ └─ python >=3.10,<3.11.0a0 , which can be installed;
    │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4] would require
    │ │ └─ python >=3.11,<3.12.0a0 , which can be installed;
    │ └─ matplotlib-base [3.10.1|3.9.2|3.9.3|3.9.4] would require
    │ └─ python [>=3.13,<3.14.0a0 |>=3.13.0rc2,<3.14.0a0 ], which can be installed;
    ├─ matplotlib 3.9** is installable with the potential options
    │ ├─ matplotlib [3.9.1|3.9.2|3.9.3|3.9.4] would require
    │ │ └─ python >=3.10,<3.11.0a0 , which can be installed;
    │ ├─ matplotlib [3.9.1|3.9.2|3.9.3|3.9.4] would require
    │ │ └─ python >=3.11,<3.12.0a0 , which can be installed;
    │ ├─ matplotlib 3.9.2 would require
    │ │ └─ matplotlib-base >=3.9.2,<3.9.3.0a0 with the potential options
    │ │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base [3.10.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base 3.9.2 conflicts with any installable versions previously reported;
    │ │ └─ matplotlib-base [3.9.1|3.9.2|3.9.3|3.9.4] would require
    │ │ └─ python >=3.9,<3.10.0a0 , which can be installed;
    │ ├─ matplotlib [3.9.2|3.9.3|3.9.4] would require
    │ │ └─ python [>=3.13,<3.14.0a0 |>=3.13.0rc2,<3.14.0a0 ], which can be installed;
    │ ├─ matplotlib [3.9.1|3.9.2|3.9.3|3.9.4] would require
    │ │ └─ python >=3.9,<3.10.0a0 , which can be installed;
    │ ├─ matplotlib 3.9.1 would require
    │ │ └─ matplotlib-base >=3.9.1,<3.9.2.0a0 with the potential options
    │ │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base [3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ └─ matplotlib-base 3.9.1 conflicts with any installable versions previously reported;
    │ ├─ matplotlib 3.9.3 would require
    │ │ └─ matplotlib-base >=3.9.3,<3.9.4.0a0 with the potential options
    │ │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base [3.10.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ ├─ matplotlib-base [3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ │ └─ matplotlib-base 3.9.3 conflicts with any installable versions previously reported;
    │ └─ matplotlib 3.9.4 would require
    │ └─ matplotlib-base >=3.9.4,<3.9.5.0a0 with the potential options
    │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ ├─ matplotlib-base [3.10.1|3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ ├─ matplotlib-base [3.10.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ ├─ matplotlib-base [3.9.1|3.9.2|3.9.3|3.9.4], which can be installed (as previously explained);
    │ └─ matplotlib-base 3.9.4 conflicts with any installable versions previously reported;
    └─ pin-1 is not installable because it requires
    └─ python 3.12.* , which conflicts with any installable versions previously reported.


    What else can I do to recover from those errors? I cannot upgrade, i cannot downgrade, I have no clue. Suddenly something broke and there seems to be nothing I can do?

    Continue reading...

Compartilhe esta Página