Can't install using pip install netket after installing the requirements
Created by: VolodyaCO
I have installed the requirements successfully:
sudo apt-get install cmake libopenmpi-dev openmpi-bin openmpi-doc
Now, when I try installing it I get errors (which I will show at the end of this issue).
When I follow the instructions for compiling the package I get:
netket/build$ cmake .. -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- [NetKet] CMAKE_BUILD_TYPE not specified, setting it to Release. Use
-DCMAKE_BUILD_TYPE=...
to overwrite. -- Found PythonInterp: /home/vladimir/anaconda3/bin/python3.7 (found version "3.7.1") -- Found PythonLibs: /home/vladimir/anaconda3/lib/libpython3.7m.so -- Found MPI_C: /home/vladimir/anaconda3/envs/mybinder-env/lib/libmpi.so (found version "3.1") -- Found MPI_CXX: /home/vladimir/anaconda3/envs/mybinder-env/lib/libmpi_cxx.so (found version "3.1") -- Found MPI: TRUE (found version "3.1")
-- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5")
-- Looking for sgemm_ -- Looking for sgemm_ - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
CMake Error at /home/vladimir/anaconda3/envs/mybinder-env/lib/python3.5/site-packages/cmake/data/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find BLAS (missing: BLAS_LIBRARIES) Call Stack (most recent call first): /home/vladimir/anaconda3/envs/mybinder-env/lib/python3.5/site-packages/cmake/data/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /home/vladimir/anaconda3/envs/mybinder-env/lib/python3.5/site-packages/cmake/data/share/cmake-3.15/Modules/FindBLAS.cmake:806 (find_package_handle_standard_args) CMakeLists.txt:186 (find_package)-- Configuring incomplete, errors occurred! See also "/home/vladimir/Documents/Programs/netket/build/CMakeFiles/CMakeOutput.log". See also "/home/vladimir/Documents/Programs/netket/build/CMakeFiles/CMakeError.log".
I guess that the important part is Could NOT find BLAS (missing: BLAS_LIBRARIES)
, but don't know how to fix this.
Also, the pip install netket
gives:
pip install netket Collecting netket Using cached https://files.pythonhosted.org/packages/70/32/1c5e3ef004f4f89b72a32ead3148fd56a0cbad43aafe72e1c6a9d8faafd4/netket-2.0.tar.gz Collecting cmake>=3.10.3 (from netket) Using cached https://files.pythonhosted.org/packages/45/c4/e69313ade2a3e992e7178744b0e56bdd8f23e79e15066a68cf490504beed/cmake-3.13.3-cp36-cp36m-manylinux1_x86_64.whl Collecting numpy>=1.16 (from netket) Using cached https://files.pythonhosted.org/packages/0e/46/ae6773894f7eacf53308086287897ec568eac9768918d913d5b9d366c5db/numpy-1.17.3-cp36-cp36m-manylinux1_x86_64.whl Collecting scipy>=1.2.1 (from netket) Using cached https://files.pythonhosted.org/packages/29/50/a552a5aff252ae915f522e44642bb49a7b7b31677f9580cfd11bcc869976/scipy-1.3.1-cp36-cp36m-manylinux1_x86_64.whl Building wheels for collected packages: netket Running setup.py bdist_wheel for netket ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-3y0u5rcn/netket/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/tmpolv19b5spip-wheel- --python-tag cp36: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: -c --help [cmd1 cmd2 ...] or: -c --help-commands or: -c cmd --help
error: invalid command 'bdist_wheel'
Failed building wheel for netket Running setup.py clean for netket Failed to build netket Installing collected packages: cmake, numpy, scipy, netket Running setup.py install for netket ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-3y0u5rcn/netket/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-uy2l46i7-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/netket copying netket/output.py -> build/lib.linux-x86_64-3.6/netket copying netket/supervised.py -> build/lib.linux-x86_64-3.6/netket copying netket/stats.py -> build/lib.linux-x86_64-3.6/netket copying netket/layer.py -> build/lib.linux-x86_64-3.6/netket copying netket/exact.py -> build/lib.linux-x86_64-3.6/netket copying netket/dynamics.py -> build/lib.linux-x86_64-3.6/netket copying netket/utils.py -> build/lib.linux-x86_64-3.6/netket copying netket/init.py -> build/lib.linux-x86_64-3.6/netket copying netket/hilbert.py -> build/lib.linux-x86_64-3.6/netket copying netket/optimizer.py -> build/lib.linux-x86_64-3.6/netket copying netket/unsupervised.py -> build/lib.linux-x86_64-3.6/netket copying netket/core.py -> build/lib.linux-x86_64-3.6/netket copying netket/machine.py -> build/lib.linux-x86_64-3.6/netket copying netket/variational.py -> build/lib.linux-x86_64-3.6/netket copying netket/graph.py -> build/lib.linux-x86_64-3.6/netket copying netket/sampler.py -> build/lib.linux-x86_64-3.6/netket copying netket/operator.py -> build/lib.linux-x86_64-3.6/netket running build_ext warning: CMakeBuild: -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- [NetKet] CMAKE_BUILD_TYPE not specified, setting it to Release. Use
-DCMAKE_BUILD_TYPE=...
to overwrite. -- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.8", minimum required is "3.6.8") -- Found PythonLibs: python3.6m -- Found MPI_C: /home/vladimir/anaconda3/envs/mybinder-env/lib/libmpi.so (found version "3.1") -- Found MPI_CXX: /home/vladimir/anaconda3/envs/mybinder-env/lib/libmpi_cxx.so (found version "3.1") -- Found MPI: TRUE (found version "3.1") -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Looking for sgemm -- Looking for sgemm_ - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE CMake Error at /home/vladimir/anaconda3/envs/mybinder-env/lib/python3.5/site-packages/cmake/data/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find BLAS (missing: BLAS_LIBRARIES) Call Stack (most recent call first): /home/vladimir/anaconda3/envs/mybinder-env/lib/python3.5/site-packages/cmake/data/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /home/vladimir/anaconda3/envs/mybinder-env/lib/python3.5/site-packages/cmake/data/share/cmake-3.15/Modules/FindBLAS.cmake:806 (find_package_handle_standard_args) CMakeLists.txt:186 (find_package)-- Configuring incomplete, errors occurred! See also "/tmp/pip-build-3y0u5rcn/netket/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log". See also "/tmp/pip-build-3y0u5rcn/netket/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-3y0u5rcn/netket/setup.py", line 168, in <module> install_requires=["numpy>=1.16", "cmake>=3.10.3", "scipy>=1.2.1"], File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 78, in run _build_ext.run(self) File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/usr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "/usr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "/tmp/pip-build-3y0u5rcn/netket/setup.py", line 122, in build_extension ["cmake", ext.sourcedir] + cmake_args, stderr=subprocess.STDOUT File "/usr/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 438, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-3y0u5rcn/netket', '-DNETKET_PYTHON_VERSION=3.6.8', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-3y0u5rcn/netket/build/lib.linux-x86_64-3.6/netket']' returned non-zero exit status 1. ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-3y0u5rcn/netket/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-uy2l46i7-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-3y0u5rcn/netket/
How can I fix this issue in order to install netket?