Gmxapi gromacs 2022 error

GROMACS version: 2022
GROMACS modification: Yes/No

Hi dear users and developers,

Please, I simply was following the instructions on the link: Full installation instructions — GROMACS 2022 documentation

and I had installed gromacs-2022 successfully before that, with no -DGMXAPI flag. Also, I have already all python libraries and environment set. When I executed this step:

. /path/to/gromacs/bin/GMXRC
pip install --no-cache-dir gmxapi

with the path for gromacs-2022, the following error was produced (here in a short text):

Building wheel for gmxapi (pyproject.toml) … error
error: subprocess-exited-with-error

× Building wheel for gmxapi (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [124 lines of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for gmxapi
Failed to build gmxapi
ERROR: Could not build wheels for gmxapi, which is required to install pyproject.toml-based projects

However, wheel was built and it is installed correctly. Could you give some support?

. /path/to/gromacs/bin/GMXRC

You used the actual installation path here, right?

╰─> [124 lines of output]

We can’t help without the full output. Please copy the raw text from the terminal window. Note that you can format the terminal output in the forum post either by using the </> button or a “triple-back-tick” on a line by itself to begin and end a “code” block.

However, wheel was built and it is installed correctly.

Do you mean the wheel package was built and installed correctly, or that the gmxapi wheel was built and installed correctly?

“wheels” are a form of Python package (analogous to a document format, compression scheme, or image format). There is a Python package called wheel that helps build “wheels” for other packages.

pip saw that you had wheel installed, so it tried to build a “wheel” for gmxapi (but failed).

Please also provide any other information that might be helpful, like your Python version, what type of virtual environment you are using (if any), and what operating system (and distribution) you are using. It may also be useful to know the full cmake command line that you used when configuring the GROMACS 2022 installation.

. /path/to/gromacs/bin/GMXRC

You used the actual installation path here, right?

Yes, I just copied the instructions, but substituting for my path, which you can see here:

(base) (myenv) luciano@pople:~/softwares$ which gmx
/home/luciano/softwares/software-gromacs-2022/bin/gmx

About your explanation:

“wheels” are a form of Python package (analogous to a document format, compression scheme, or image format). There is a Python package called wheel that helps build “wheels” for other packages.

I know it, but both are well configured, I guess. At least, look at below the full output. However, when it was building the wheels, the first error appeared, look at it:

(base) (myenv) luciano@pople:~/softwares$ pip install --no-cache-dir gmxapi 
Collecting gmxapi
  Downloading gmxapi-0.3.0.tar.gz (168 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.1/168.1 KB 1.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting networkx>=2.0
  Downloading networkx-2.7-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 3.9 MB/s eta 0:00:00
Collecting packaging
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 KB 3.4 MB/s eta 0:00:00
Collecting numpy>1.7
  Downloading numpy-1.22.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.8/16.8 MB 5.2 MB/s eta 0:00:00
Requirement already satisfied: pybind11 in /home/luciano/myenv/lib/python3.8/site-packages (from gmxapi) (2.9.1)
Collecting pyparsing!=3.0.5,>=2.0.2
  Downloading pyparsing-3.0.7-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.0/98.0 KB 4.8 MB/s eta 0:00:00
Building wheels for collected packages: gmxapi
  Building wheel for gmxapi (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for gmxapi (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [124 lines of output]
      Importing gmxapi.
      Importing gmxapi.operation
      Creating runner for signature (*, front: gmxapi.datamodel.NDArray = (), back: gmxapi.datamodel.NDArray = ()) -> gmxapi.datamodel.NDArray.
      Importing gmxapi.commandline
      Creating runner for signature (command: gmxapi.datamodel.NDArray, shell: bool, output, stdin: str = '', _exist_ok=True).
      Creating runner for signature (filemap: dict) -> list.
      Importing gmx.workflow
      Using schema version gmxapi_workspec_0_1.
      Importing gmxapi.simulation.mdrun
      Importing gmxapi.simulation.read_tpr
      Importing gmxapi.simulation.modify_input
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/datamodel.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/utility.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/_transform.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/testsupport.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/__init__.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/version.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/exceptions.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/commandline.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/operation.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/typing.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/_logging.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/abc.py -> build/lib.linux-x86_64-3.8/gmxapi
      creating build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/context.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/fileio.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/mdrun.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/read_tpr.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/__init__.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/modify_input.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/abc.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/workflow.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      running build_ext
      loading initial cache file /home/luciano/softwares/software-gromacs-2022/share/cmake/gromacs/gromacs-hints.cmake
      -- The C compiler identification is GNU 9.3.0
      -- The CXX compiler identification is GNU 9.3.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/gcc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/g++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Python3: /home/luciano/myenv/bin/python3 (found suitable version "3.8.12", minimum required is "3.7") found components: Interpreter Development Development.Module Development.Embed
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      CMake Error at CMakeLists.txt:106 (find_package):
        By not providing "Findgmxapi.cmake" in CMAKE_MODULE_PATH this project has
        asked CMake to find a package configuration file provided by "gmxapi", but
        CMake did not find one.
      
        Could not find a package configuration file provided by "gmxapi" with any
        of the following names:
      
          gmxapiConfig.cmake
          gmxapi-config.cmake
      
        Add the installation prefix of "gmxapi" to CMAKE_PREFIX_PATH or set
        "gmxapi_DIR" to a directory containing one of the above files.  If "gmxapi"
        provides a separate development package or SDK, be sure it has been
        installed.
      
      
      -- Configuring incomplete, errors occurred!
      See also "/tmp/pip-install-g6qket0l/gmxapi_d40131a2c486443793c48827870e2316/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
      Traceback (most recent call last):
        File "/home/luciano/myenv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/luciano/myenv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/luciano/myenv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 244, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 347, in <module>
          setup(
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
          self.build_extensions()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
          self._build_extensions_serial()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
          self.build_extension(ext)
        File "setup.py", line 191, in build_extension
          subprocess.check_call(
        File "/home/luciano/softwares/anaconda3/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-g6qket0l/gmxapi_d40131a2c486443793c48827870e2316', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-g6qket0l/gmxapi_d40131a2c486443793c48827870e2316/build/lib.linux-x86_64-3.8/gmxapi/', '-DCMAKE_BUILD_TYPE=Release', '-Dgmxapi_ROOT=/home/luciano/softwares/software-gromacs-2022', '-C', '/home/luciano/softwares/software-gromacs-2022/share/cmake/gromacs/gromacs-hints.cmake', '-Dpybind11_ROOT=/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/pybind11/share/cmake/pybind11']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gmxapi
Failed to build gmxapi
ERROR: Could not build wheels for gmxapi, which is required to install pyproject.toml-based projects

The cmake line to install and configure the gromacs is:

cmake -DCMAKE_INSTALL_PREFIX=$DEST -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_PREFIX_PATH:PATH="${SW}:${OB}:${SQ3}:${LIB};${INCLUDE}:${OPENMPI}" -DBUILD_SHARED_LIBS:BOOL=OFF -DGMX_PREFER_STATIC_LIBS=ON -DGMX_GPLUSPLUS_PATH=/usr/bin/g++ .. >& cmake.log

Please, it is important to notice here that I tried other flags suggested in the manual, like -DGMXAPI=ON, but it didn’t work properly.

I would like to thank you dear Eric for your attention and help. Hope the quotes have been used correctly, ;-).

Hi dear Eric,

Well, I used the correct path for sure. I tried to answer you before, but I guess my message got lost.

The full output error was:

`(base) (myenv) luciano@pople:~/softwares$ pip install --no-cache-dir gmxapi 
Collecting gmxapi
  Downloading gmxapi-0.3.0.tar.gz (168 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.1/168.1 KB 1.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting networkx>=2.0
  Downloading networkx-2.7-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 3.9 MB/s eta 0:00:00
Collecting packaging
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 KB 3.4 MB/s eta 0:00:00
Collecting numpy>1.7
  Downloading numpy-1.22.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.8/16.8 MB 5.2 MB/s eta 0:00:00
Requirement already satisfied: pybind11 in /home/luciano/myenv/lib/python3.8/site-packages (from gmxapi) (2.9.1)
Collecting pyparsing!=3.0.5,>=2.0.2
  Downloading pyparsing-3.0.7-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.0/98.0 KB 4.8 MB/s eta 0:00:00
Building wheels for collected packages: gmxapi
  Building wheel for gmxapi (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for gmxapi (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [124 lines of output]
      Importing gmxapi.
      Importing gmxapi.operation
      Creating runner for signature (*, front: gmxapi.datamodel.NDArray = (), back: gmxapi.datamodel.NDArray = ()) -> gmxapi.datamodel.NDArray.
      Importing gmxapi.commandline
      Creating runner for signature (command: gmxapi.datamodel.NDArray, shell: bool, output, stdin: str = '', _exist_ok=True).
      Creating runner for signature (filemap: dict) -> list.
      Importing gmx.workflow
      Using schema version gmxapi_workspec_0_1.
      Importing gmxapi.simulation.mdrun
      Importing gmxapi.simulation.read_tpr
      Importing gmxapi.simulation.modify_input
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/datamodel.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/utility.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/_transform.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/testsupport.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/__init__.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/version.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/exceptions.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/commandline.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/operation.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/typing.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/_logging.py -> build/lib.linux-x86_64-3.8/gmxapi
      copying gmxapi/abc.py -> build/lib.linux-x86_64-3.8/gmxapi
      creating build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/context.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/fileio.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/mdrun.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/read_tpr.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/__init__.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/modify_input.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/abc.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      copying gmxapi/simulation/workflow.py -> build/lib.linux-x86_64-3.8/gmxapi/simulation
      running build_ext
      loading initial cache file /home/luciano/softwares/software-gromacs-2022/share/cmake/gromacs/gromacs-hints.cmake
      -- The C compiler identification is GNU 9.3.0
      -- The CXX compiler identification is GNU 9.3.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/gcc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/g++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Python3: /home/luciano/myenv/bin/python3 (found suitable version "3.8.12", minimum required is "3.7") found components: Interpreter Development Development.Module Development.Embed
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      CMake Error at CMakeLists.txt:106 (find_package):
        By not providing "Findgmxapi.cmake" in CMAKE_MODULE_PATH this project has
        asked CMake to find a package configuration file provided by "gmxapi", but
        CMake did not find one.
      
        Could not find a package configuration file provided by "gmxapi" with any
        of the following names:
      
          gmxapiConfig.cmake
          gmxapi-config.cmake
      
        Add the installation prefix of "gmxapi" to CMAKE_PREFIX_PATH or set
        "gmxapi_DIR" to a directory containing one of the above files.  If "gmxapi"
        provides a separate development package or SDK, be sure it has been
        installed.
      
      
      -- Configuring incomplete, errors occurred!
      See also "/tmp/pip-install-g6qket0l/gmxapi_d40131a2c486443793c48827870e2316/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
      Traceback (most recent call last):
        File "/home/luciano/myenv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/luciano/myenv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/luciano/myenv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 244, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 347, in <module>
          setup(
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
          self.build_extensions()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
          self._build_extensions_serial()
        File "/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
          self.build_extension(ext)
        File "setup.py", line 191, in build_extension
          subprocess.check_call(
        File "/home/luciano/softwares/anaconda3/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-g6qket0l/gmxapi_d40131a2c486443793c48827870e2316', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-g6qket0l/gmxapi_d40131a2c486443793c48827870e2316/build/lib.linux-x86_64-3.8/gmxapi/', '-DCMAKE_BUILD_TYPE=Release', '-Dgmxapi_ROOT=/home/luciano/softwares/software-gromacs-2022', '-C', '/home/luciano/softwares/software-gromacs-2022/share/cmake/gromacs/gromacs-hints.cmake', '-Dpybind11_ROOT=/tmp/pip-build-env-_32qmzym/overlay/lib/python3.8/site-packages/pybind11/share/cmake/pybind11']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gmxapi
Failed to build gmxapi
ERROR: Could not build wheels for gmxapi, which is required to install pyproject.toml-based projects

It seem the wheels wasn't built properly. The cmake line to configure the gromacs installation was:

`cmake -DCMAKE_INSTALL_PREFIX=$DEST -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_PREFIX_PATH:PATH="${SW}:${OB}:${SQ3}:${LIB};${INCLUDE}:${OPENMPI}" -DBUILD_SHARED_LIBS:BOOL=OFF -DGMX_PREFER_STATIC_LIBS=ON -DGMX_GPLUSPLUS_PATH=/usr/bin/g++    .. >& cmake.log`

Best regards,

Luciano

Hi dear Eric,

The problem was fixed. I solved it changing the cmake configuring for gmxapi into the gromacs installation. After that, the gmxapi was correctly configured:

(base) luciano@pople:~/softwares$ pip install --no-cache-dir gmxapi 
Collecting gmxapi
  Downloading gmxapi-0.3.0.tar.gz (168 kB)
     |████████████████████████████████| 168 kB 2.7 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pybind11
  Downloading pybind11-2.9.1-py2.py3-none-any.whl (211 kB)
     |████████████████████████████████| 211 kB 10.9 MB/s 
Requirement already satisfied: numpy>1.7 in ./anaconda3/lib/python3.8/site-packages (from gmxapi) (1.19.5)
Requirement already satisfied: networkx>=2.0 in ./anaconda3/lib/python3.8/site-packages (from gmxapi) (2.6.3)
Requirement already satisfied: packaging in ./anaconda3/lib/python3.8/site-packages (from gmxapi) (21.0)
Requirement already satisfied: pyparsing>=2.0.2 in ./anaconda3/lib/python3.8/site-packages (from packaging->gmxapi) (3.0.4)
Building wheels for collected packages: gmxapi
  Building wheel for gmxapi (PEP 517) ... done
  Created wheel for gmxapi: filename=gmxapi-0.3.0-cp38-cp38-linux_x86_64.whl size=253987 sha256=f545cd5e42a052dec1470eae51b104fb2430dc29cf3c916189a20d14a0f0a2a6
  Stored in directory: /tmp/pip-ephem-wheel-cache-ny6euo_s/wheels/c1/97/70/9c3cfb0f9c69480b8af9216cd596599316ebbe8803848e8567
Successfully built gmxapi
Installing collected packages: pybind11, gmxapi
Successfully installed gmxapi-0.3.0 pybind11-2.9.1

Many Thanks!

Glad you got it working!

Can you please share what you changed? (Other users of the forum may have the same problem.) What were the cmake options that didn’t work and what were the options that worked?