njzjz / deepmd-gnn

DeePMD-kit plugin for various graph neural network models
GNU Lesser General Public License v3.0
21 stars 3 forks source link

Issue: Your installed Caffe2 version uses protobuf but the protobuf library cannot be found. #31

Open zhoufy20 opened 3 weeks ago

zhoufy20 commented 3 weeks ago

Dear developers of deepmd-gnn: I get some trouble when execute export CMAKE_PREFIX_PATH=$(python -c "import torch;print(torch.utils.cmake_prefix_path)") and pip install . Below are callback error:


      Call Stack (most recent call first):
        /home/feiyu/miniconda3/envs/deepmd/lib/python3.10/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:53 (include)
        /home/feiyu/miniconda3/envs/deepmd/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
        CMakeLists.txt:46 (find_package)

      CMake Error at /home/feiyu/miniconda3/envs/deepmd/lib/python3.10/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:55 (message):
        Your installed Caffe2 version uses protobuf but the protobuf library cannot
        be found.  Did you accidentally remove it, or have you set the right
        CMAKE_PREFIX_PATH? If you do not have protobuf, you will need to install
        protobuf and set the library path accordingly.
      Call Stack (most recent call first):
        /home/feiyu/miniconda3/envs/deepmd/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
        CMakeLists.txt:46 (find_package)

      -- Configuring incomplete, errors occurred!

      *** CMake configuration failed
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for deepmd-gnn
Failed to build deepmd-gnn
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (deepmd-gnn)

deepmd-kit I install the deepmd-kit from off-line packages.

All packages

Package                   Version          Editable project location
------------------------- ---------------- ----------------------------------------------------------
absl-py                   2.1.0
aiohappyeyeballs          2.4.0
aiohttp                   3.10.6
aiosignal                 1.3.1
anyio                     4.6.2
archspec                  0.2.3
argon2-cffi               21.3.0
argon2-cffi-bindings      21.2.0
array_api_compat          1.8
ase                       3.23.0
asttokens                 2.0.5
astunparse                1.6.3
async-lru                 2.0.4
async-timeout             4.0.3
attrs                     24.2.0
Babel                     2.11.0
beautifulsoup4            4.12.3
bleach                    4.1.0
blinker                   1.8.2
boltons                   24.0.0
bracex                    2.2.1
Brotli                    1.1.0
cached-property           1.5.2
cachetools                5.5.0
certifi                   2024.8.30
cffi                      1.17.1
charset-normalizer        3.3.2
click                     8.1.7
cloudpickle               3.0.0
cmake                     3.30.5
colorama                  0.4.6
comm                      0.2.1
conda                     24.7.1
conda-libmamba-solver     24.7.0
conda-package-handling    2.3.0
conda_package_streaming   0.10.0
ConfigArgParse            1.7
contourpy                 1.3.0
cryptography              43.0.1
cycler                    0.12.1
dargs                     0.4.8
debugpy                   1.6.7
decorator                 5.1.1
deepmd-kit                3.0.0b4
defusedxml                0.7.1
distro                    1.9.0
dpdata                    0.2.21
e3nn                      0.4.4
exceptiongroup            1.2.0
executing                 0.8.3
f90wrap                   0.2.15
fastjsonschema            2.16.2
filelock                  3.16.1
Flask                     3.0.3
flatbuffers               24.3.25
fonttools                 4.54.1
frozendict                2.4.4
frozenlist                1.4.1
gast                      0.5.5
gitdb                     4.0.11
GitPython                 3.1.43
gmpy2                     2.1.5
google-auth               2.35.0
google-auth-oauthlib      1.0.0
google-pasta              0.2.0
greenlet                  3.1.1
grpcio                    1.54.3
h11                       0.14.0
h2                        4.1.0
h5py                      3.11.0
horovod                   0.28.1
hpack                     4.0.0
httpcore                  1.0.2
httpx                     0.27.0
hyperframe                6.0.1
idna                      3.10
importlib_metadata        8.5.0
ipykernel                 6.29.5
ipython                   8.27.0
ipywidgets                8.1.2
itsdangerous              2.2.0
jedi                      0.19.1
Jinja2                    3.1.4
json5                     0.9.6
jsonpatch                 1.33
jsonpointer               3.0.0
jsonschema                4.23.0
jsonschema-specifications 2023.7.1
jupyter                   1.0.0
jupyter_client            8.6.0
jupyter-console           6.6.3
jupyter_core              5.7.2
jupyter-events            0.10.0
jupyter-lsp               2.2.0
jupyter_server            2.14.1
jupyter_server_terminals  0.4.4
jupyterlab                4.2.5
jupyterlab-pygments       0.1.2
jupyterlab_server         2.27.3
jupyterlab-widgets        3.0.10
keras                     2.14.0
kiwisolver                1.4.7
lammps                    2024.8.29
libmambapy                1.5.10
lightning-utilities       0.11.8
mace-torch                0.3.7            /mnt/e/ComPhys/GitDemo/work/deepmd/env/mace-main/mace-main
Markdown                  3.6
MarkupSafe                2.1.5
matplotlib                3.9.2
matplotlib-inline         0.1.6
matscipy                  1.1.1
mendeleev                 0.17.0
menuinst                  2.1.2
mistune                   2.0.4
ml-dtypes                 0.2.0
monty                     2024.7.30
mpi4py                    4.0.0
mpmath                    1.3.0
multidict                 6.1.0
munkres                   1.1.4
nbclient                  0.8.0
nbconvert                 7.16.4
nbformat                  5.10.4
nest-asyncio              1.6.0
networkx                  3.3
notebook                  7.2.2
notebook_shim             0.2.3
numpy                     1.26.4
oauthlib                  3.2.2
opt-einsum                3.3.0
opt-einsum-fx             0.1.4
overrides                 7.4.0
packaging                 24.1
pandas                    2.2.3
pandocfilters             1.5.0
parso                     0.8.3
pexpect                   4.8.0
pillow                    10.4.0
pip                       24.2
platformdirs              4.3.6
pluggy                    1.5.0
ply                       3.11
prettytable               3.11.0
prometheus-client         0.14.1
prompt-toolkit            3.0.43
protobuf                  4.21.12
psutil                    6.0.0
ptyprocess                0.7.0
pure-eval                 0.2.2
pyasn1                    0.6.1
pyasn1_modules            0.4.1
pycosat                   0.6.6
pycparser                 2.22
pyfiglet                  0.8.post1
Pygments                  2.18.0
PyJWT                     2.9.0
pyOpenSSL                 24.2.1
pyparsing                 3.1.4
PyQt5                     5.15.10
PyQt5-sip                 12.13.0
PySocks                   1.7.1
python-dateutil           2.9.0
python-hostlist           2.0.0
python-json-logger        2.0.7
pytz                      2024.1
pyu2f                     0.1.5
PyYAML                    6.0.2
pyzmq                     25.1.2
qtconsole                 5.6.0
QtPy                      2.4.1
quippy-ase                0.9+gitnone
referencing               0.30.2
requests                  2.32.3
requests-oauthlib         2.0.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.10.6
rsa                       4.9
ruamel.yaml               0.18.6
ruamel.yaml.clib          0.2.8
scipy                     1.14.1
Send2Trash                1.8.2
setuptools                75.1.0
sip                       6.7.12
six                       1.16.0
smmap                     5.0.1
sniffio                   1.3.0
soupsieve                 2.5
SQLAlchemy                2.0.35
stack-data                0.2.0
sympy                     1.13.2
tensorboard               2.14.1
tensorboard-data-server   0.7.0
tensorflow                2.14.0
tensorflow-estimator      2.14.0
termcolor                 2.4.0
terminado                 0.17.1
tinycss2                  1.2.1
tomli                     2.0.1
torch                     2.0.0.post200
torch-ema                 0.3
torchaudio                2.0.0
torchmetrics              1.5.1
torchvision               0.15.2a0+ab7b3e6
tornado                   6.4.1
tqdm                      4.66.5
traitlets                 5.14.3
truststore                0.9.2
typeguard                 4.3.0
typing_extensions         4.12.2
tzdata                    2024.2
unicodedata2              15.1.0
urllib3                   2.2.3
wcmatch                   9.0
wcwidth                   0.2.5
webencodings              0.5.1
websocket-client          1.8.0
Werkzeug                  3.0.4
wheel                     0.44.0
widgetsnbextension        4.0.10
wrapt                     1.14.1
xtb                       22.1
yarl                      1.12.1
zipp                      3.20.2
zstandard                 0.23.0

Thank you for your assistance!

njzjz commented 3 days ago
        Your installed Caffe2 version uses protobuf but the protobuf library cannot
        be found.  Did you accidentally remove it, or have you set the right
        CMAKE_PREFIX_PATH?

According to the error message, appending the prefix of protobuf (it should be in CONDA_PREFIX) to CMAKE_PREFIX_PATH may resolve the problem.

njzjz commented 2 days ago

Indeed, I cannot reproduce the error.