I'm trying to install DEGA
using pip install DEGA
in Anaconda prompt, per the installation instructions. However, this fails when building the wheel for DEGA
. At the top of this error is the message:
Building wheels for collected packages: DEGA
Building wheel for DEGA (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for DEGA (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [391 lines of output]
WARNING: Failed to find 'pythran-openblas' package. Please install it or change the compiler.blas setting. Defaulting to 'none'
However, I have the Pythran, OpenBLAS, and Pythran-OpenBLAS packages (pip install [package]
returns Requirement already satisfied: [package] in c:\users\[username]\anaconda3\lib\site-packages (0.3.6)
.
In the middle, it says:
C:\Users\[username]\AppData\Local\Temp\pip-build-env-q57f4t01\overlay\Lib\site-packages\setuptools\command\build_py.py:212: _Warning: Package 'DEGA.cython' is absent from the `packages` configuration.
At the end of the error message, it says:
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.44.35207\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for DEGA
Failed to build DEGA
ERROR: Failed to build installable wheels for some pyproject.toml based projects (DEGA).
I didn't include the full error message because it is extremely long.
I have tried various solutions with no success, including adding that file path (...\Hostx86\x64) to the PATH, adding other directories in the VS filepath to the PATH (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\bin
and C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin
), uninstalling and reinstalling Microsoft Visual Studio, uninstalling and reinstalling Anaconda, using various versions of Python (3.8, 3.9, 3.11, 3.13) to try to install it, uninstalling and reinstalling Pythran
, OpenBLAS
, and Pythran-OpenBLAS
, and trying to install DEGA-cython
(although it says this package doesn't exist by either conda install
or pip install
). I've scavenged various forums for answers about this question, but it seems each answer is specific to a certain circumstance, so it does not work in my case.
My system:
You're likely getting this error because DEGA requires pythran (https://github.com/LucaMenestrina/DEGA/blob/main/pyproject.toml) and pythran is only compatible with MacOS and POSIX :: Linux. It is not compatible with Windows (your OS) as can be seen in its project.toml file. Also, pythran-openblas doesn't seem to be a maintained package.
You might want to consider getting a Linux environment on your Windows machine to use this package. See How to install Linux on Windows with WSL.