BlockSci icon indicating copy to clipboard operation
BlockSci copied to clipboard

I can't install blockscipy with pip3

Open isaac1972 opened this issue 4 years ago • 4 comments
trafficstars

I installed BlockSci and the bitcoin full node to use it with Jupiter HUB. I'm trying to install the blockscipy, so that I can import BlockSci in Jupiter Notebook. But it gives me errors.

Reproduction Steps

I tried to install bioscopy with: pip3 install /BlockSci/blockscipy/ pip3 install -e /BlockSci/blockscipy/ CC=gcc-7 CXX=g++-7 sudo -H pip3 install -e blockscipy

I tried every solution I found on similar problems reading the other issues and solutions, with no success. I updated every single package involved, but still can't get through.

import blocksci in Jupiter Notebook returns obviously that the blocksci module is not present. In fact if I run pip3 list, I don't have it.

System Information

Using AMI: no
BlockSci version: 0.70 Blockchain: (e.g., Bitcoin)
Parser: Disk Total memory: 128 GB

I get this log error: ERROR: Command errored out with exit status 1: /jupiterhub/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-__14my36/setup.py'"'"'; file='"'"'/tmp/pip-req-build-__14my36/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-g1mfgipq/install-record.txt --single-version-externally-managed --compile --install-headers /jupiterhub/miniconda3/include/python3.8/blocksci Check the logs for full command output.

The log is pretty long, if needed I can paste it all.

isaac1972 avatar Feb 14 '21 09:02 isaac1972

Are you on Ubuntu 20.04?

I had a similar problem (on Ubuntu 20.04) and fixed it with the solution described in Issue 438.

I followed the steps in the Graphsense DockerFile.

Essentially this meant:

  1. Changing gcc-7 to clang-7 CC=clang-7 CXX=clang++-7 sudo -H pip3 install -e blockscipy
  2. PIP installing the prerequisites in Graphsense's requirements.txt cassandra-driver==3.24.0 requests==2.25.0

bhemen avatar Mar 22 '21 18:03 bhemen

I solved it using the commands you show up here, but also updating manually some modules involved in the installation process. It was a little time ago and don't remember exactly everything. I upgraded from 18.04 to 20.04, maybe this could be involved. Thanks, by the way.

isaac1972 avatar Mar 22 '21 19:03 isaac1972

I tried the commands again with clang-7 but still got the error. The error message is long but contains a lot of reference to NumPy, such as /usr/include/blocksci/external/range/v3/functional/invoke.hpp:134:34: error: no match for call to ‘(const NumpyConverter) (blocksci::uint256)’ I was able to follow the Dockerfile and successfully install blockscipy. I wonder if the reason is because of numpy version incompatibility. I installed the Numpy version stated in Graphsense's requirements, i.e. cassandra-driver==3.24.0 beautifulsoup4==4.9.3 lxml==4.6.1 requests==2.25.0 pandas==1.1.4 numpy==1.19.4

jiagengliu avatar Mar 23 '21 23:03 jiagengliu

I installed BlockSci and the bitcoin full node to use it with Jupiter HUB. I'm trying to install the blockscipy, so that I can import BlockSci in Jupiter Notebook. But it gives me errors.

Reproduction Steps

I tried to install bioscopy with: pip3 install /BlockSci/blockscipy/ pip3 install -e /BlockSci/blockscipy/ CC=gcc-7 CXX=g++-7 sudo -H pip3 install -e blockscipy

I tried every solution I found on similar problems reading the other issues and solutions, with no success. I updated every single package involved, but still can't get through.

import blocksci in Jupiter Notebook returns obviously that the blocksci module is not present. In fact if I run pip3 list, I don't have it.

System Information

Using AMI: no BlockSci version: 0.70 Blockchain: (e.g., Bitcoin) Parser: Disk Total memory: 128 GB

I get this log error: ERROR: Command errored out with exit status 1: /jupiterhub/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-__14my36/setup.py'"'"'; file='"'"'/tmp/pip-req-build-__14my36/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-g1mfgipq/install-record.txt --single-version-externally-managed --compile --install-headers /jupiterhub/miniconda3/include/python3.8/blocksci Check the logs for full command output.

The log is pretty long, if needed I can paste it all.

Wood1314 avatar Apr 03 '22 11:04 Wood1314