'Pyscf install error: failed building wheel

I keep getting this error after entering pip install pyscf

pi@node0:~ $ pip install pyscf
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyscf
  Using cached pyscf-2.0.1.tar.gz (7.7 MB)
Requirement already satisfied: h5py>=2.7 in ./.local/lib/python3.9/site-packages (from pyscf) (3.6.0)
Requirement already satisfied: numpy!=1.16,!=1.17,>=1.13 in /usr/lib/python3/dist-packages (from pyscf) (1.19.5)
Requirement already satisfied: scipy!=1.5.0,!=1.5.1 in ./.local/lib/python3.9/site-packages (from pyscf) (1.8.0)
Building wheels for collected packages: pyscf
  

> Blockquote

Building wheel for pyscf (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/setup.py'"'"'; __file__='"'"'/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-9u2jmdza
       cwd: /tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/
  Complete output (8 lines):
  running bdist_wheel
  running build
  running build_ext
  Configuring extensions
  cmake -S/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/pyscf/lib -Bbuild/temp.linux-armv7l-3.9
  CMake Error: The source directory "/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/pyscf/lib" does not appear to contain CMakeLists.txt.
  Specify --help for usage, or press the help button on the CMake GUI.
  error: command '/home/pi/.local/bin/cmake' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pyscf
  Running setup.py clean for pyscf
Failed to build pyscf
Installing collected packages: pyscf
    Running setup.py install for pyscf ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/setup.py'"'"'; __file__='"'"'/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-o41l2en8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.9/pyscf
         cwd: /tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/
    Complete output (8 lines):
    running install
    running build
    running build_ext
    Configuring extensions
    cmake -S/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/pyscf/lib -Bbuild/temp.linux-armv7l-3.9
    CMake Error: The source directory "/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/pyscf/lib" does not appear to contain CMakeLists.txt.
    Specify --help for usage, or press the help button on the CMake GUI.
    error: command '/home/pi/.local/bin/cmake' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/setup.py'"'"'; __file__='"'"'/tmp/pip-install-06n1abpy/pyscf_2f35d0e7c6964ec3accad5d9185c5b11/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-o41l2en8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.9/pyscf Check the logs for full command output.


Solution 1:[1]

You can try 'conda install -c conda-forge pyscf'. It worked for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Celso Rego