Yeonghun1675 / ChatMOF

Predict and Inverse design for metal-organic framework with large-language models (llms)
https://www.nature.com/articles/s41467-024-48998-4
MIT License
50 stars 6 forks source link

Installation fails due to pymatgen wheel build error #7

Closed Andy6M closed 8 months ago

Andy6M commented 10 months ago

Description:

Dear author, I tried to install ChatMOF on my machine, but the installation failed during the pip install -e . step.

Steps to Reproduce:

  1. $ git clone https://github.com/Yeonghun1675/ChatMOF.git
  2. $ cd ChatMOF/
  3. $ pip install -e .

Environment:

Error Message:


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

  × Building wheel for pymatgen (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [586 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/pymatgen
      creating build/lib.linux-x86_64-cpython-310/pymatgen/alchemy
      copying pymatgen/alchemy/__init__.py -> build/lib.linux-x86_64-cpython-310/pymatgen/alchemy
    (Other copies omitted)
      running build_ext
      /tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/Cython/Compiler/Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-le48hem5/pymatgen_f4b87c9bfd87448d98306e2dbb11350b/pymatgen/optimization/linear_assignment.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      Compiling pymatgen/optimization/linear_assignment.pyx because it changed.
      [1/1] Cythonizing pymatgen/optimization/linear_assignment.pyx
      building 'pymatgen.optimization.linear_assignment' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/pymatgen
      creating build/temp.linux-x86_64-cpython-310/pymatgen/optimization
      gcc -pthread -B /root/miniconda3/envs/mof/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/envs/mof/include -fPIC -O2 -isystem /root/miniconda3/envs/mof/include -fPIC -I/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/numpy/core/include -I/root/miniconda3/envs/mof/include/python3.10 -c pymatgen/optimization/linear_assignment.c -o build/temp.linux-x86_64-cpython-310/pymatgen/optimization/linear_assignment.o
      In file included from /tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                       from /tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                       from pymatgen/optimization/linear_assignment.c:1167:
      /tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      pymatgen/optimization/linear_assignment.c: In function ‘__pyx_pf_8pymatgen_12optimization_17linear_assignment_16LinearAssignment___init__.isra.0’:
      pymatgen/optimization/linear_assignment.c:20070:7: warning: ‘__pyx_v_last’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      20070 |   int __pyx_v_last;
            |       ^~~~~~~~~~~~
      pymatgen/optimization/linear_assignment.c:20868:19: warning: ‘__pyx_v_j2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      20868 |         __pyx_t_5 = __pyx_v_j1;
            |         ~~~~~~~~~~^~~~~~~~~~~~
      pymatgen/optimization/linear_assignment.c:20084:7: note: ‘__pyx_v_j2’ was declared here
      20084 |   int __pyx_v_j2;
            |       ^~~~~~~~~~
      pymatgen/optimization/linear_assignment.c:21602:96: warning: ‘__pyx_v_m’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      21602 |                 (__pyx_v_v[__pyx_v_j1]) = (((__pyx_v_v[__pyx_v_j1]) + (__pyx_v_d[__pyx_v_j1])) - __pyx_v_m);
            |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      pymatgen/optimization/linear_assignment.c:20080:26: note: ‘__pyx_v_m’ was declared here
      20080 |   __pyx_t_5numpy_float_t __pyx_v_m;
            |                          ^~~~~~~~~
      gcc -pthread -B /root/miniconda3/envs/mof/compiler_compat -shared -Wl,-rpath,/root/miniconda3/envs/mof/lib -Wl,-rpath-link,/root/miniconda3/envs/mof/lib -L/root/miniconda3/envs/mof/lib -Wl,-rpath,/root/miniconda3/envs/mof/lib -Wl,-rpath-link,/root/miniconda3/envs/mof/lib -L/root/miniconda3/envs/mof/lib build/temp.linux-x86_64-cpython-310/pymatgen/optimization/linear_assignment.o -o build/lib.linux-x86_64-cpython-310/pymatgen/optimization/linear_assignment.cpython-310-x86_64-linux-gnu.so
      /tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/Cython/Compiler/Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-le48hem5/pymatgen_f4b87c9bfd87448d98306e2dbb11350b/pymatgen/util/coord_cython.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      warning: pymatgen/util/coord_cython.pyx:214:25: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: pymatgen/util/coord_cython.pyx:263:41: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          #ensure correct shape
          fcoords1, fcoords2 = np.atleast_2d(fcoords1, fcoords2)

          pbc = lattice.pbc
          cdef int n_pbc = sum(pbc)
          cdef int n_pbc_im = 3 ** n_pbc
                                ^
      ------------------------------------------------------------

      pymatgen/util/coord_cython.pyx:91:26: Cannot assign type 'double' to 'int'
      Compiling pymatgen/util/coord_cython.pyx because it changed.
      [1/1] Cythonizing pymatgen/util/coord_cython.pyx
      Traceback (most recent call last):
        File "/root/miniconda3/envs/mof/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/root/miniconda3/envs/mof/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/root/miniconda3/envs/mof/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 434, in build_wheel
          return self._build_with_temp_dir(
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 72, in <module>
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-wbpn5mzr/normal/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 249, in build_extension
          _build_ext.build_extension(self, ext)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
          new_ext = cythonize(
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-wbpn5mzr/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: pymatgen/util/coord_cython.pyx
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pymatgen
  Building wheel for wget (setup.py) ... done
  Created wheel for wget: filename=wget-3.2-py3-none-any.whl size=9656 sha256=106955b99c520cf194f186f093239e3639ef96cc714584dbaebb927ddfb6c493
  Stored in directory: /root/.cache/pip/wheels/7a/6d/bb/2e81753127056d3756de433bcb983900f50a990432a36f1d7e
  Building wheel for docopt (setup.py) ... done
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13705 sha256=71d4b1fb12cd50a2101115c580f2beb731f26e4bf8ff69932c3e722be01dd707
  Stored in directory: /root/.cache/pip/wheels/0c/5e/6b/8820c3d6f05aeae3801db2c9c003c0c14d93c917680a448396
  Building wheel for jax (pyproject.toml) ... done
  Created wheel for jax: filename=jax-0.4.14-py3-none-any.whl size=1535361 sha256=2e26df1cd82c6b5f5a06ad93295e3e05607da327f6b468de7c0921777d059e86
  Stored in directory: /root/.cache/pip/wheels/bd/98/b3/a1b1d2f550e2ccd1ebfb7d1162af448dd2a3a16051c076fbaf
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492025 sha256=89fc6a6b4d4a2ab3a70c42de7aa9f83df15c9bbb6934c813b6c44fd7181f37a3
  Stored in directory: /root/.cache/pip/wheels/6e/54/16/2ab500319d13efeeee4b2007aab5a01589dc775fb1a1f617c5
Successfully built timeout_decorator wikipedia wget docopt jax future
Failed to build pymatgen
ERROR: Could not build wheels for pymatgen, which is required to install pyproject.toml-based projects
Yeonghun1675 commented 9 months ago

Hi @Andy6M,

First of all, thank you very much for your interest in our ChatMOF project. We have checked the installation error you sent us. We have confirmed that this issue occurs with the PORMAKE library. (PORMAKE is a library for generating MOFs.) For unknown reasons, PORMAKE does not seem to be installing at the moment. We have informed the authors of PORMAKE that we hope to resolve this issue and will let you know if it is resolved.

Andy6M commented 9 months ago

Hi @Yeonghun1675,

Thanks for the quick update on the PORMAKE issue. I appreciate your team looking into it. I'll await further updates. 감사합니다.

Best, Andy6M

Yeonghun1675 commented 8 months ago

Hello @Andy6M ,

It's been a while. I'm reaching out to troubleshoot some issues with our code. I think you should be able to use it normally now, but please let me know if you run into any further issues.