sandialabs / Spitfire

Spitfire is a Python/C++ library for constructing tabulated chemistry models and solving differential equations.
Other
37 stars 9 forks source link

Need help with installation #33

Closed ParthSwaroop closed 6 months ago

ParthSwaroop commented 6 months ago

Hi,

I'm actually trying to install LIM1TR: Lithium-Ion Modeling with 1-D Thermal Runaway model. The prerequisite for this is to install spitfire.

I'm following the spitfire documentation suggested for anaconda.

I have installed python 3.11.7.

I'm only a beginner user in python, so please pardon me if I get the terminologies wrong or if don't understand what you suggest :). I will try to explain the issue to the best of my abilities.

These were the steps I followed :

1) first install the libmamba environment solver -> this was not completed. It is also trying to access Visual Studio 2) I created a virtual environment with the same name "spenv" 3) I cloned the conda package from base to spenv 4) Out of packages mentioned below, it does not have compliers setuptools and cython inbuilt.

conda install -y compilers setuptools numpy scipy matplotlib Cython sphinx numpydoc gitpython

So when I try to install compilers, this is error message I get :

I believe the package is not install correctly. Can you help with this error?

`(spenv) C:\ProgramData\anaconda3>conda install -y compilers
Channels:
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\Parth Swaroop\.conda\envs\spenv

  added / updated specs:
    - compilers

The following NEW packages will be INSTALLED:

  c-compiler         conda-forge/win-64::c-compiler-1.7.0-hcfcfb64_1
  clangdev           conda-forge/win-64::clangdev-5.0.0-flang_3
  compilers          conda-forge/win-64::compilers-1.7.0-h57928b3_1
  cxx-compiler       conda-forge/win-64::cxx-compiler-1.7.0-h91493d7_1
  flang              conda-forge/win-64::flang-5.0.0-he025d50_20180525
  flang_win-64       conda-forge/win-64::flang_win-64-5.0.0-h13ae965_20180526
  fortran-compiler   conda-forge/win-64::fortran-compiler-1.7.0-h9655429_1
  libflang           conda-forge/win-64::libflang-5.0.0-h6538335_20180525
  llvm-meta          conda-forge/noarch::llvm-meta-5.0.0-0
  openmp             conda-forge/win-64::openmp-5.0.0-vc14_1
  vs2019_win-64      conda-forge/win-64::vs2019_win-64-19.29.30139-he1865b1_18
  vswhere            conda-forge/win-64::vswhere-3.1.4-h57928b3_0

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2023.12.12~ --> conda-forge::ca-certificates-2024.2.2-h56e8100_0

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            pkgs/main/win-64::certifi-2024.2.2-py~ --> conda-forge/noarch::certifi-2024.2.2-pyhd8ed1ab_0

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

C:\ProgramData\anaconda3>SET DISTUTILS_USE_SDK=1

C:\ProgramData\anaconda3>SET MSSdk=1

C:\ProgramData\anaconda3>SET "VS_VERSION=16.0"

C:\ProgramData\anaconda3>SET "VS_MAJOR=16"

C:\ProgramData\anaconda3>SET "VS_YEAR=2019"

C:\ProgramData\anaconda3>set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"

C:\ProgramData\anaconda3>set "MSYS2_ENV_CONV_EXCL=CL"

C:\ProgramData\anaconda3>set "PY_VCRUNTIME_REDIST=\bin\vcruntime140.dll"

C:\ProgramData\anaconda3>set "CXX=cl.exe"

C:\ProgramData\anaconda3>set "CC=cl.exe"

C:\ProgramData\anaconda3>set "VSINSTALLDIR="

C:\ProgramData\anaconda3>set "NEWER_VS_WITH_OLDER_VC=0"

C:\ProgramData\anaconda3>for /F "usebackq tokens=*" %i in (`vswhere.exe -nologo -products * -version [16.0,17.0) -property installationPath`) do (set "VSINSTALLDIR=%i\" )

C:\ProgramData\anaconda3>if not exist "" (for /F "usebackq tokens=*" %i in (`vswhere.exe -nologo -products * -requires Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64 -property installationPath`) do (
set "VSINSTALLDIR=%i\"
 set "NEWER_VS_WITH_OLDER_VC=1"
) )

C:\ProgramData\anaconda3>if not exist "" (for /F "usebackq tokens=*" %i in (`vswhere.exe -nologo -products * -requires Microsoft.VisualStudio.Component.VC.v142.x86.x64 -property installationPath`) do (
set "VSINSTALLDIR=%i\"
 set "NEWER_VS_WITH_OLDER_VC=1"
) )

C:\ProgramData\anaconda3>if not exist "" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\" )

C:\ProgramData\anaconda3>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\" )

C:\ProgramData\anaconda3>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\" )

C:\ProgramData\anaconda3>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\" )

C:\ProgramData\anaconda3>IF NOT "" == "" (
set "INCLUDE=;"
 set "LIB=;;C:\Users\Parth Swaroop\.conda\envs\spenv\Library\lib"
 set "CMAKE_PREFIX_PATH=;"
)

C:\ProgramData\anaconda3>call :GetWin10SdkDir

C:\ProgramData\anaconda3>call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 exit /B 1

C:\ProgramData\anaconda3>exit /B 0

C:\ProgramData\anaconda3>for /F %i in ('dir /ON /B "C:\Program Files (x86)\Windows Kits\10\\include\10.*"') DO (SET WindowsSDKVer=%~i )

C:\ProgramData\anaconda3>(SET WindowsSDKVer=10.0.22000.0 )

C:\ProgramData\anaconda3>if errorlevel 1 (echo "Didn't find any windows 10 SDK. I'm not sure if things will work, but let's try..." )  else (echo Windows SDK version found as: "10.0.22000.0" )
Windows SDK version found as: "10.0.22000.0"

C:\ProgramData\anaconda3>set "CMAKE_PLAT=x64"

C:\ProgramData\anaconda3>set "VCVARSBAT=64"

C:\ProgramData\anaconda3>set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release"

C:\ProgramData\anaconda3>IF "" == "1" (set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX= -DCMAKE_PROGRAM_PATH=\bin;\Scripts;\Library\bin;\bin;\Scripts;\Library\bin" )

C:\ProgramData\anaconda3>IF NOT "win-64" == "win-64" (
set "CONDA_BUILD_CROSS_COMPILATION=1"
 set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=AMD64"
)  else (set "CONDA_BUILD_CROSS_COMPILATION=0" )

C:\ProgramData\anaconda3>IF 2019 GEQ 2019 (
set "CMAKE_GEN=Visual Studio 16 2019"
 set "USE_NEW_CMAKE_GEN_SYNTAX=1"
)  ELSE (
IF "win-64" == "win-64" (set "CMAKE_GEN=Visual Studio 16 2019 Win64" )  else (set "CMAKE_GEN=Visual Studio 16 2019" )
 set "USE_NEW_CMAKE_GEN_SYNTAX=0"
)

C:\ProgramData\anaconda3>echo "NEWER_VS_WITH_OLDER_VC=0"
"NEWER_VS_WITH_OLDER_VC=0"

C:\ProgramData\anaconda3>if "0" == "1" (set /p NEWER_VS= 0<"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt" )

C:\ProgramData\anaconda3>type "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"
The system cannot find the path specified.

C:\ProgramData\anaconda3>dir "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\\VC\Redist\MSVC\"
The system cannot find the path specified.

C:\ProgramData\anaconda3>if "0" == "1" (
echo ""
 if "~0,4" == "14.2" (set "CMAKE_GEN=Visual Studio 16 2019" )  else (set "CMAKE_GEN=Visual Studio 17 2022" )
 set "USE_NEW_CMAKE_GEN_SYNTAX=1"
)

C:\ProgramData\anaconda3>IF "Visual Studio 16 2019" == "" SET "CMAKE_GENERATOR=Visual Studio 16 2019"

C:\ProgramData\anaconda3>IF "1" == "1" (
IF "x64" == "" SET "CMAKE_GENERATOR_PLATFORM=x64"
 IF "v142" == "" SET "CMAKE_GENERATOR_TOOLSET=v142"
)

C:\ProgramData\anaconda3>pushd C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
The system cannot find the path specified.

C:\ProgramData\anaconda3>CALL "VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.29 10.0.22000.0
The system cannot find the path specified.

C:\ProgramData\anaconda3>if 1 NEQ 0 (if "" == "" (CALL "VC\Auxiliary\Build\vcvars64.bat" ) )
The system cannot find the path specified.

C:\ProgramData\anaconda3>popd

C:\ProgramData\anaconda3>call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1>nul 2>&1

C:\ProgramData\anaconda3>if errorlevel 1 exit /B 1

C:\ProgramData\anaconda3>exit /B 0
michael-a-hansen commented 6 months ago

@ParthSwaroop Hello there. It looks like you are trying to install this on Windows. I have no experience and I am suspicious that much of this software stack will not work on Windows, since we only routinely run it on Linux and Unix systems. I'm afraid I won't be much help here, especially since it appears to be an internal anaconda issue.

ParthSwaroop commented 6 months ago

I see. Thanks Michael for your response :) I'll look for alternatives.