xtb-python icon indicating copy to clipboard operation
xtb-python copied to clipboard

Error installing on conda

Open Hgracia opened this issue 1 year ago • 3 comments

Describe the bug Hello, I am having an error intalling xtb. I am runing conda on windows.

(MetalDock) C:\Users\hgrac>pip install xtb
Collecting xtb
Using cached xtb-22.1.tar.gz (62 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [39 lines of output]
+ meson setup C:\Users\hgrac\AppData\Local\Temp\pip-install-giv2oe_n\xtb_50f2a007669d4859be2f77a5fd27893e C:\Users\hgrac\AppData\Local\Temp\pip-install-giv2oe_n\xtb_50f2a007669d4859be2f77a5fd27893e.mesonpy-gnvpjay9 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\hgrac\AppData\Local\Temp\pip-install-giv2oe_n\xtb_50f2a007669d4859be2f77a5fd27893e.mesonpy-gnvpjay9\meson-python-native-file.ini
The Meson build system
Version: 1.5.2
Source dir: C:\Users\hgrac\AppData\Local\Temp\pip-install-giv2oe_n\xtb_50f2a007669d4859be2f77a5fd27893e
Build dir: C:\Users\hgrac\AppData\Local\Temp\pip-install-giv2oe_n\xtb_50f2a007669d4859be2f77a5fd27893e.mesonpy-gnvpjay9
Build type: native build
Project name: xtb-python
Project version: undefined
Activating VS 17.8.3
C compiler for the host machine: cl (msvc 19.38.33133 "Compilador de optimizaci¢n de C/C++ de Microsoft (R) versi¢n 19.38.33133 para x64")
C linker for the host machine: link link 14.38.33133.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Did not find pkg-config by name 'pkg-config'
Found pkg-config: NO
Found CMake: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.27.2)
Run-time dependency xtb found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency xtb
Downloading xtb-6.5.1 source from https://github.com/grimme-lab/xtb/releases/download/v6.5.1/xtb-6.5.1-source.tar.xz

  Executing subproject xtb-6.5.1

  xtb-6.5.1| Project name: xtb
  xtb-6.5.1| Project version: 6.5.1

  ..\subprojects\xtb-6.5.1\meson.build:19:0: ERROR: Unknown compiler(s): [['ifort'], ['gfortran'], ['flang'], ['pgfortran'], ['g95']]
  The following exception(s) were encountered:
  Running `ifort --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `ifort -V` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `gfortran --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `gfortran -V` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `flang --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `flang -V` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `pgfortran --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `pgfortran -V` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `g95 --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
  Running `g95 -V` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"

  A full log can be found at C:\Users\hgrac\AppData\Local\Temp\pip-install-giv2oe_n\xtb_50f2a007669d4859be2f77a5fd27893e\.mesonpy-gnvpjay9\meson-logs\meson-log.txt
  [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

To Reproduce Steps to reproduce the behaviour:

  1. happens with input (include input files)
  2. start xtb with (all the options here)
  3. run xtb with your options and the --verbose flag
  4. output showing the error

Please provide all input and output file such that we confirm your report.

Expected behaviour A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

Hgracia avatar Oct 16 '24 09:10 Hgracia

There is no Fortran compiler available on your Windows system to actually build xtb. You need to provide a compiler to install xtb on Windows.

awvwgk avatar Oct 16 '24 10:10 awvwgk

I installed a fortran compiler, but now I have this error:

pip install xtb
Collecting xtb
  Using cached xtb-22.1.tar.gz (62 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      + meson setup C:\Users\hgrac\AppData\Local\Temp\pip-install-qeou0mt8\xtb_1964dacb12084c8ebd6a1130499a5413 C:\Users\hgrac\AppData\Local\Temp\pip-install-qeou0mt8\xtb_1964dacb12084c8ebd6a1130499a5413\.mesonpy-ah945f17 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\hgrac\AppData\Local\Temp\pip-install-qeou0mt8\xtb_1964dacb12084c8ebd6a1130499a5413\.mesonpy-ah945f17\meson-python-native-file.ini
      The Meson build system
      Version: 1.5.2
      Source dir: C:\Users\hgrac\AppData\Local\Temp\pip-install-qeou0mt8\xtb_1964dacb12084c8ebd6a1130499a5413
      Build dir: C:\Users\hgrac\AppData\Local\Temp\pip-install-qeou0mt8\xtb_1964dacb12084c8ebd6a1130499a5413\.mesonpy-ah945f17
      Build type: native build
      Project name: xtb-python
      Project version: undefined
      C compiler for the host machine: gcc (gcc 10.3.0 "gcc (tdm64-1) 10.3.0")
      C linker for the host machine: gcc ld.bfd 2.36.1
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Found pkg-config: YES (C:\Users\hgrac\miniconda3\envs\MetalDock\Library\bin\pkg-config.EXE) 0.29.2
      WARNING: Found CMake 'C:\\Users\\hgrac\\miniconda3\\envs\\MetalDock\\Scripts\\cmake.EXE' but couldn't run it
      Found CMake: NO
      Run-time dependency xtb found: NO (tried pkgconfig and cmake)
      Looking for a fallback subproject for the dependency xtb
      Downloading xtb-6.5.1 source from https://github.com/grimme-lab/xtb/releases/download/v6.5.1/xtb-6.5.1-source.tar.xz

      Executing subproject xtb-6.5.1

      xtb-6.5.1| Project name: xtb
      xtb-6.5.1| Project version: 6.5.1
      xtb-6.5.1| Fortran compiler for the host machine: gfortran (gcc 10.3.0 "GNU Fortran (tdm64-1) 10.3.0")
      xtb-6.5.1| Fortran linker for the host machine: gfortran ld.bfd 2.36.1
      xtb-6.5.1| C compiler for the host machine: gcc (gcc 10.3.0 "gcc (tdm64-1) 10.3.0")
      xtb-6.5.1| C linker for the host machine: gcc ld.bfd 2.36.1
      xtb-6.5.1| Program git found: YES (C:\Program Files\Git\cmd\git.EXE)
      xtb-6.5.1| WARNING: You should add the boolean check kwarg to the run_command call.
      xtb-6.5.1| It currently defaults to false,
      xtb-6.5.1| but it will default to true in future releases of meson.
      xtb-6.5.1| See also: https://github.com/mesonbuild/meson/issues/9300
      xtb-6.5.1| Program python3 found: YES (C:\Users\hgrac\miniconda3\envs\MetalDock\python.exe)
      xtb-6.5.1| Configuring xtb_version.fh using configuration

      ..\subprojects\xtb-6.5.1\meson\meson.build:115:23: ERROR: C shared or static library 'mkl_gf_lp64' not found

      A full log can be found at C:\Users\hgrac\AppData\Local\Temp\pip-install-qeou0mt8\xtb_1964dacb12084c8ebd6a1130499a5413\.mesonpy-ah945f17\meson-logs\meson-log.txt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

(MetalDock) C:\Users\hgrac>mkl_intel_ilp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
"mkl_intel_ilp64.lib" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

Hgracia avatar Oct 17 '24 13:10 Hgracia

I believe the required linear algebra libraries are not provided on the system. For pip you can add --configuration=setup-args=-Dxtb-6.5.1:la_backend=netlib to use lapack.dll and blas.dll for providing linear algebra support (please make sure the DLLs are available on your system)

awvwgk avatar Oct 21 '24 16:10 awvwgk

I have the exact same error as shown above but pip is not understanding the configuration flag. I'm on macOS so idk if that changes the flags available to me. What can I do to get xtb installed into my environment?

klhowie22 avatar Nov 07 '24 23:11 klhowie22

xtb-python can be installed on Windows now via conda-forge. Closing this as resolved.

awvwgk avatar Dec 05 '24 09:12 awvwgk