citp / BlockSci

A high-performance tool for blockchain science and exploration
https://citp.github.io/BlockSci/
GNU General Public License v3.0
1.34k stars 259 forks source link

Error when compiling blocksci python bindings (python3) #410

Closed sune-gaulsh closed 4 years ago

sune-gaulsh commented 4 years ago

Hi,

I am trying to compile a local setup of blocksci in accordance with the instructions on https://citp.github.io/BlockSci/compiling.html

The C++ binaries compile fine but when I try to compile the python binding it hits a snag and complains (see below)

I tried copying blocksci-config.cmake from the release/scr but that did not work.

The Python version is 3.7.7 and the build log is attached

Any thoughts?

(note /###/BlockSci/ is just not conceal the ### is not in the actual output CMakeOutput.log )

"

CC=gcc-7 CXX=g++-7 sudo -H pip3.7 install -e blockscipy Obtaining file:///###/BlockSci/blockscipy Requirement already satisfied: multiprocess>=0.70.5 in /usr/local/lib/python3.7/site-packages (from blocksci==0.5.0) (0.70.9) Requirement already satisfied: psutil>=5.4.2 in /usr/local/lib/python3.7/site-packages (from blocksci==0.5.0) (5.7.0) Requirement already satisfied: pycrypto>=2.6.1 in /usr/local/lib/python3.7/site-packages (from blocksci==0.5.0) (2.6.1) Requirement already satisfied: pandas>=0.22.0 in /usr/local/lib/python3.7/site-packages (from blocksci==0.5.0) (1.0.3) Requirement already satisfied: dateparser>=0.6.0 in /usr/local/lib/python3.7/site-packages (from blocksci==0.5.0) (0.7.4) Requirement already satisfied: dill>=0.3.1 in /usr/local/lib/python3.7/site-packages (from multiprocess>=0.70.5->blocksci==0.5.0) (0.3.1.1) Requirement already satisfied: python-dateutil>=2.6.1 in /usr/local/lib/python3.7/site-packages (from pandas>=0.22.0->blocksci==0.5.0) (2.8.1) Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.7/site-packages (from pandas>=0.22.0->blocksci==0.5.0) (1.18.4) Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/site-packages (from pandas>=0.22.0->blocksci==0.5.0) (2020.1) Requirement already satisfied: regex!=2019.02.19 in /usr/local/lib/python3.7/site-packages (from dateparser>=0.6.0->blocksci==0.5.0) (2020.5.14) Requirement already satisfied: tzlocal in /usr/local/lib/python3.7/site-packages (from dateparser>=0.6.0->blocksci==0.5.0) (2.1) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas>=0.22.0->blocksci==0.5.0) (1.14.0) Installing collected packages: blocksci Running setup.py develop for blocksci ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/###/BlockSci/blockscipy/setup.py'"'"'; file='"'"'/###/BlockSci/blockscipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: /###/BlockSci/blockscipy/ Complete output (56 lines): running develop running egg_info writing blocksci.egg-info/PKG-INFO writing dependency_links to blocksci.egg-info/dependency_links.txt writing requirements to blocksci.egg-info/requires.txt writing top-level names to blocksci.egg-info/top_level.txt reading manifest file 'blocksci.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'blocksci.egg-info/SOURCES.txt' running build_ext CMake Error at CMakeLists.txt:6 (find_package): By not providing "Findblocksci.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "blocksci", but CMake did not find one.

  Could not find a package configuration file provided by "blocksci" with any
  of the following names:

    blocksciConfig.cmake
    blocksci-config.cmake

  Add the installation prefix of "blocksci" to CMAKE_PREFIX_PATH or set
  "blocksci_DIR" to a directory containing one of the above files.  If
  "blocksci" provides a separate development package or SDK, be sure it has
  been installed.

-- Configuring incomplete, errors occurred!
See also "/###/BlockSci/blockscipy/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/###/BlockSci/blockscipy/setup.py", line 76, in <module>
    'dateparser>=0.6.0'
  File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.7/site-packages/setuptools/command/develop.py", line 38, in run
    self.install_for_development()
  File "/usr/local/lib/python3.7/site-packages/setuptools/command/develop.py", line 140, in install_for_development
    self.run_command('build_ext')
  File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/###/BlockSci/blockscipy/setup.py", line 32, in run
    self.build_extension(ext)
  File "/###/BlockSci/blockscipy/setup.py", line 56, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/###/BlockSci/blockscipy', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/###/BlockSci/blockscipy/blocksci', '-DPYTHON_EXECUTABLE=/usr/local/bin/python3.7', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/###/BlockSci/blockscipy/setup.py'"'"'; file='"'"'/###/BlockSci/blockscipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

"

maltemoeser commented 4 years ago

Looks like you're on master? Try using the v0.6 branch (git checkout v0.6)

amukherjee1991 commented 4 years ago

It seems like the same error as what I am getting?

I changed to v0.6. same issue persists.