Closed robbieallover closed 10 months ago
It seems the installation instructions are outdated since the last update.
To install depencies, please use
$ python -m pip install .[dev]
I will take a look and test and update the installation instructions.
question ive been working on a project and not sure if i mentioned it or not but i barely have time to sit and eat but i have been working on this project for a couple weeks now because of my time issue and was wondering if possibly you might be interested in working together its not anything in git hub its a side project for a website that i need to save money for myself but it also in turn if we could get it working right and could draw the right people to it we could make some passive income i dont wanna say too much and im not sure if i can message you on here wher eits just me and you being able to see but anywho if you wanna discuss it you can always hmu on my email robbieallover@gmail.com and then i can send my number or fb so it would be easier to discuss it could use the help and i dont mind sharing where its deserved feel free to say no i will completely understand
Installation instructions are updated in new 0.6.14 release. And also some Dockerfiles are included to create docker images for various linux system for testing.
pip install bitcoinlib Defaulting to user installation because normal site-packages is not writeable Collecting bitcoinlib Downloading bitcoinlib-0.6.13-py3-none-any.whl.metadata (6.6 kB) Requirement already satisfied: requests>=2.25.0 in /usr/lib/python3/dist-packages (from bitcoinlib) (2.31.0) Requirement already satisfied: ecdsa>=0.17 in /usr/lib/python3/dist-packages (from bitcoinlib) (0.18.0) Collecting pycryptodome>=3.14.1 (from bitcoinlib) Downloading pycryptodome-3.19.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB) Collecting SQLAlchemy>=2.0.0 (from bitcoinlib) Downloading SQLAlchemy-2.0.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.6 kB) Collecting fastecdsa>=2.2.1 (from bitcoinlib) Downloading fastecdsa-2.3.0.tar.gz (49 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.5/49.5 kB 143.0 kB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy>=1.22.0 in /usr/lib/python3/dist-packages (from bitcoinlib) (1.24.2) Requirement already satisfied: typing-extensions>=4.2.0 in ./.local/lib/python3.11/site-packages (from SQLAlchemy>=2.0.0->bitcoinlib) (4.8.0) Requirement already satisfied: greenlet!=0.4.17 in /usr/lib/python3/dist-packages (from SQLAlchemy>=2.0.0->bitcoinlib) (2.0.2) Downloading bitcoinlib-0.6.13-py3-none-any.whl (4.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 10.4 MB/s eta 0:00:00 Downloading pycryptodome-3.19.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 8.9 MB/s eta 0:00:00 Downloading SQLAlchemy-2.0.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 9.1 MB/s eta 0:00:00 Building wheels for collected packages: fastecdsa Building wheel for fastecdsa (pyproject.toml) ... done Created wheel for fastecdsa: filename=fastecdsa-2.3.0-cp311-cp311-linux_x86_64.whl size=88331 sha256=f69f3096e1eee76ac46409b971b1282ba9a347e906bd5090336ee6488e6d6fe9 Stored in directory: /home/kali/.cache/pip/wheels/cb/74/9c/c4202eec18047f35bf4b93479c3a90c52a0bd9185cadb96878 Successfully built fastecdsa Installing collected packages: SQLAlchemy, pycryptodome, fastecdsa, bitcoinlib ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
buildbot 2023.11.29 requires sqlalchemy<1.5,>=1.3.0, but you have sqlalchemy 2.0.23 which is incompatible.
Successfully installed SQLAlchemy-2.0.23 bitcoinlib-0.6.13 fastecdsa-2.3.0 pycryptodome-3.19.0
┌──(kali㉿kali)-[~] └─$ sudo apt install -y postgresql postgresql-contrib mysql-server libpq-dev libmysqlclient-dev [sudo] password for kali: Reading package lists... Done Building dependency tree... Done Reading state information... Done Package mysql-server is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
Package libmysqlclient-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libmariadb-dev-compat libmariadb-dev
E: Package 'mysql-server' has no installation candidate E: Package 'libmysqlclient-dev' has no installation candidate
┌──(kali㉿kali)-[~] └─$ pip install bitcoinlib
Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: bitcoinlib in ./.local/lib/python3.11/site-packages (0.6.13) Requirement already satisfied: requests>=2.25.0 in /usr/lib/python3/dist-packages (from bitcoinlib) (2.31.0) Requirement already satisfied: ecdsa>=0.17 in /usr/lib/python3/dist-packages (from bitcoinlib) (0.18.0) Requirement already satisfied: pycryptodome>=3.14.1 in ./.local/lib/python3.11/site-packages (from bitcoinlib) (3.19.0) Requirement already satisfied: SQLAlchemy>=2.0.0 in ./.local/lib/python3.11/site-packages (from bitcoinlib) (2.0.23) Requirement already satisfied: fastecdsa>=2.2.1 in ./.local/lib/python3.11/site-packages (from bitcoinlib) (2.3.0) Requirement already satisfied: numpy>=1.22.0 in /usr/lib/python3/dist-packages (from bitcoinlib) (1.24.2) Requirement already satisfied: typing-extensions>=4.2.0 in ./.local/lib/python3.11/site-packages (from SQLAlchemy>=2.0.0->bitcoinlib) (4.8.0) Requirement already satisfied: greenlet!=0.4.17 in /usr/lib/python3/dist-packages (from SQLAlchemy>=2.0.0->bitcoinlib) (2.0.2)
┌──(kali㉿kali)-[~] └─$ virtualenv -p python3 venv/bitcoinlib created virtual environment CPython3.11.6.final.0-64 in 3004ms creator CPython3Posix(dest=/home/kali/venv/bitcoinlib, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/kali/.local/share/virtualenv) added seed packages: pip==23.3, setuptools==68.1.2, wheel==0.41.2 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
┌──(kali㉿kali)-[~] └─$ source venv/bitcoinlib/bin/activate
┌──(bitcoinlib)─(kali㉿kali)-[~] └─$ git clone https://github.com/1200wd/bitcoinlib.git Cloning into 'bitcoinlib'... remote: Enumerating objects: 20165, done. remote: Counting objects: 100% (3920/3920), done. remote: Compressing objects: 100% (515/515), done. remote: Total 20165 (delta 3451), reused 3530 (delta 3392), pack-reused 16245 Receiving objects: 100% (20165/20165), 10.06 MiB | 7.75 MiB/s, done. Resolving deltas: 100% (15814/15814), done.
┌──(bitcoinlib)─(kali㉿kali)-[~] └─$ cd bitcoinlib
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ pip install -r requirements-dev.txt ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements-dev.txt'
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ ls CHANGELOG MANIFEST.in init.py docs pyproject.toml setup.cfg updatedb.py LICENSE README.rst bitcoinlib examples requirements.txt tests
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ pip install -r requirements.txt
Ignoring win-unicode-console: markers 'platform_system == "Windows"' don't match your environment Collecting requests>=2.25.0 (from -r requirements.txt (line 1)) Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB) Collecting fastecdsa>=2.2.1 (from -r requirements.txt (line 2)) Using cached fastecdsa-2.3.0-cp311-cp311-linux_x86_64.whl Collecting scrypt>=0.8.18 (from -r requirements.txt (line 3)) Downloading scrypt-0.8.20.tar.gz (55 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.9/55.9 kB 265.1 kB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting pycryptodome>=3.14.1 (from -r requirements.txt (line 4)) Using cached pycryptodome-3.19.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB) Collecting SQLAlchemy>=2.0.0 (from -r requirements.txt (line 5)) Using cached SQLAlchemy-2.0.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.6 kB) Collecting numpy>=1.22.0 (from -r requirements.txt (line 6)) Using cached numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB) Collecting sphinx>=6.0.0 (from -r requirements.txt (line 7)) Using cached sphinx-7.2.6-py3-none-any.whl.metadata (5.9 kB) Collecting coveralls>=3.0.1 (from -r requirements.txt (line 8)) Downloading coveralls-3.3.1-py2.py3-none-any.whl (14 kB) Collecting psycopg2>=2.9.2 (from -r requirements.txt (line 9)) Downloading psycopg2-2.9.9.tar.gz (384 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 384.9/384.9 kB 1.7 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting mysql-connector-python>=8.0.27 (from -r requirements.txt (line 10)) Downloading mysql_connector_python-8.2.0-cp311-cp311-manylinux_2_17_x86_64.whl.metadata (2.1 kB) Collecting mysqlclient>=2.1.0 (from -r requirements.txt (line 11)) Downloading mysqlclient-2.2.0.tar.gz (89 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 820.3 kB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [27 lines of output] /bin/sh: 1: pkg-config: not found /bin/sh: 1: pkg-config: not found Trying pkg-config --exists mysqlclient Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127. Trying pkg-config --exists mariadb Command 'pkg-config --exists mariadb' returned non-zero exit status 127. Traceback (most recent call last): File "/home/kali/venv/bitcoinlib/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/home/kali/venv/bitcoinlib/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/venv/bitcoinlib/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-txm9m4dt/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-txm9m4dt/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-txm9m4dt/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 154, in
File "", line 48, in get_config_posix
File "", line 27, in find_package_name
Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ sudo apt install build-essential python3-dev libgmp3-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.10). python3-dev is already the newest version (3.11.4-5+b1). The following packages were automatically installed and are no longer required: libcurl3-nss libobjc-12-dev libstdc++-12-dev libtexluajit2 lua-lpeg nss-plugin-pem python3-jdcal python3-pyminifier Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: libgmp3-dev 0 upgraded, 1 newly installed, 0 to remove and 125 not upgraded. Need to get 322 kB of archives. After this operation, 331 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://http.kali.org/kali kali-rolling/main amd64 libgmp3-dev amd64 2:6.3.0+dfsg-2 [322 kB] Fetched 322 kB in 1s (251 kB/s)
Selecting previously unselected package libgmp3-dev:amd64. (Reading database ... 443021 files and directories currently installed.) Preparing to unpack .../libgmp3-dev_2%3a6.3.0+dfsg-2_amd64.deb ... Unpacking libgmp3-dev:amd64 (2:6.3.0+dfsg-2) ... Setting up libgmp3-dev:amd64 (2:6.3.0+dfsg-2) ...
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ sudo dnf install python3-devel gmp-devel sudo: dnf: command not found
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ sudo apt install libssl-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done libssl-dev is already the newest version (3.0.11-1). The following packages were automatically installed and are no longer required: libcurl3-nss libobjc-12-dev libstdc++-12-dev libtexluajit2 lua-lpeg nss-plugin-pem python3-jdcal python3-pyminifier Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 125 not upgraded.
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ sudo yum install gcc openssl-devel sudo: yum: command not found
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ pip install gcc openssl-devel
ERROR: Could not find a version that satisfies the requirement gcc (from versions: none) ERROR: No matching distribution found for gcc
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ sudo apt install postgresql-server-dev-
zsh: parse error near `\n'
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ python setup.py test
python: can't open file '/home/kali/bitcoinlib/setup.py': [Errno 2] No such file or directory
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ ls CHANGELOG MANIFEST.in init.py docs pyproject.toml setup.cfg updatedb.py LICENSE README.rst bitcoinlib examples requirements.txt tests
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ pip install bitcoinlib --upgrade Collecting bitcoinlib Using cached bitcoinlib-0.6.13-py3-none-any.whl.metadata (6.6 kB) Collecting requests>=2.25.0 (from bitcoinlib) Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB) Collecting ecdsa>=0.17 (from bitcoinlib) Downloading ecdsa-0.18.0-py2.py3-none-any.whl (142 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.9/142.9 kB 627.6 kB/s eta 0:00:00 Collecting pycryptodome>=3.14.1 (from bitcoinlib) Using cached pycryptodome-3.19.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB) Collecting SQLAlchemy>=2.0.0 (from bitcoinlib) Using cached SQLAlchemy-2.0.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.6 kB) Collecting fastecdsa>=2.2.1 (from bitcoinlib) Using cached fastecdsa-2.3.0-cp311-cp311-linux_x86_64.whl Collecting numpy>=1.22.0 (from bitcoinlib) Using cached numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB) Collecting six>=1.9.0 (from ecdsa>=0.17->bitcoinlib) Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting charset-normalizer<4,>=2 (from requests>=2.25.0->bitcoinlib) Using cached charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB) Collecting idna<4,>=2.5 (from requests>=2.25.0->bitcoinlib) Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB) Collecting urllib3<3,>=1.21.1 (from requests>=2.25.0->bitcoinlib) Using cached urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB) Collecting certifi>=2017.4.17 (from requests>=2.25.0->bitcoinlib) Using cached certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB) Collecting typing-extensions>=4.2.0 (from SQLAlchemy>=2.0.0->bitcoinlib) Using cached typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB) Collecting greenlet!=0.4.17 (from SQLAlchemy>=2.0.0->bitcoinlib) Using cached greenlet-3.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (3.7 kB) Using cached bitcoinlib-0.6.13-py3-none-any.whl (4.3 MB) Using cached numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB) Using cached pycryptodome-3.19.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB) Using cached requests-2.31.0-py3-none-any.whl (62 kB) Using cached SQLAlchemy-2.0.23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB) Using cached certifi-2023.11.17-py3-none-any.whl (162 kB) Using cached charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB) Using cached greenlet-3.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (616 kB) Using cached idna-3.6-py3-none-any.whl (61 kB) Using cached typing_extensions-4.8.0-py3-none-any.whl (31 kB) Using cached urllib3-2.1.0-py3-none-any.whl (104 kB) Installing collected packages: urllib3, typing-extensions, six, pycryptodome, numpy, idna, greenlet, fastecdsa, charset-normalizer, certifi, SQLAlchemy, requests, ecdsa, bitcoinlib Successfully installed SQLAlchemy-2.0.23 bitcoinlib-0.6.13 certifi-2023.11.17 charset-normalizer-3.3.2 ecdsa-0.18.0 fastecdsa-2.3.0 greenlet-3.0.1 idna-3.6 numpy-1.26.2 pycryptodome-3.19.0 requests-2.31.0 six-1.16.0 typing-extensions-4.8.0 urllib3-2.1.0
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ rm .bitcoinlib/install.log rm: cannot remove '.bitcoinlib/install.log': No such file or directory
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ python updatedb.py Database should update automatically when using BitcoinLib. If automatic update fails you can run this script. !!! After everything is backuped !!!
Wallet and Key data will be copied to new database. Transaction data will NOT be copied Updating database file: /home/kali/.bitcoinlib/database/sqlite:////home/kali/.bitcoinlib/database/bitcoinlib.sqlite Old database will be backed up to /home/kali/.bitcoinlib/database/sqlite:////home/kali/.bitcoinlib/database/bitcoinlib.sqlite.backup-20231201-09:22 Type 'y' or 'Y' to continue or any other key to cancel: y Traceback (most recent call last): File "/usr/lib/python3.11/shutil.py", line 825, in move os.rename(src, real_dst) FileNotFoundError: [Errno 2] No such file or directory: '/home/kali/.bitcoinlib/database/sqlite:////home/kali/.bitcoinlib/database/bitcoinlib.sqlite' -> '/home/kali/.bitcoinlib/database/sqlite:////home/kali/.bitcoinlib/database/bitcoinlib.sqlite.backup-20231201-09:22'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/kali/bitcoinlib/updatedb.py", line 52, in
move(database_file, database_backup_file)
File "/usr/lib/python3.11/shutil.py", line 845, in move
copy_function(src, real_dst)
File "/usr/lib/python3.11/shutil.py", line 436, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/kali/.bitcoinlib/database/sqlite:////home/kali/.bitcoinlib/database/bitcoinlib.sqlite'
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ pip install scrypt Collecting scrypt Using cached scrypt-0.8.20.tar.gz (55 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: scrypt Building wheel for scrypt (pyproject.toml) ... done Created wheel for scrypt: filename=scrypt-0.8.20-cp311-cp311-linux_x86_64.whl size=75537 sha256=cb636f4af8c863a0c127a1506c0370d49b22f3f799966c824554796727cb017f Stored in directory: /home/kali/.cache/pip/wheels/5f/0d/05/94050af9bc8152f24181885e37db42aec0f5b938bafca85377 Successfully built scrypt Installing collected packages: scrypt Successfully installed scrypt-0.8.20
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ os.environ['BCL_CONFIG_FILE'] = '/var/www/blocksmurfer/bitcoinlib.ini' os.environ[BCL_CONFIG_FILE]: command not found
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ ls CHANGELOG MANIFEST.in init.py docs pyproject.toml setup.cfg updatedb.py LICENSE README.rst bitcoinlib examples requirements.txt tests
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib] └─$ bitcoinlib
┌──(bitcoinlib)─(kali㉿kali)-[~/bitcoinlib/bitcoinlib] └─$ ls init.py config db_cache.py main.py scripts.py transactions.py wordlist pycache data encoding.py mnemonic.py services values.py blocks.py db.py keys.py networks.py tools wallets.py
this is the provided install instructions given on the site
Install, Update and Tweak BitcoinLib Installation Install with pip
$ pip install bitcoinlib
Package can be found at https://pypi.org/project/bitcoinlib/ Install from source
Required packages:
sudo apt install -y postgresql postgresql-contrib mysql-server libpq-dev libmysqlclient-dev
Create a virtual environment for instance on linux with virtualenv:
$ virtualenv -p python3 venv/bitcoinlib $ source venv/bitcoinlib/bin/activate
Then clone the repository and install dependencies:
$ git clone https://github.com/1200wd/bitcoinlib.git $ cd bitcoinlib $ pip install -r requirements-dev.txt
Package dependencies
Required Python Packages, are automatically installed upon installing bitcoinlib:
If you want to use BIP38 encrypted private keys, it is strongly advised to install the much faster scrypt library.
pip install scrypt Other requirements Linux
On Debian, Ubuntu or their derivatives:
sudo apt install build-essential python3-dev libgmp3-dev
On Fedora, CentOS or RHEL:
sudo dnf install python3-devel gmp-devel
To install OpenSSL development package on Debian, Ubuntu or their derivatives
sudo apt install libssl-dev
To install OpenSSL development package on Fedora, CentOS or RHEL
sudo yum install gcc openssl-devel Development environment
Install database packages for MySQL and PostgreSQL
sudo apt install mysql-server postgresql postgresql-contrib libmysqlclient-dev
Check for the latest version of the PostgreSQL dev server:
sudo apt install postgresql-server-dev-
From library root directory install the Python requirements
pip install -r requirements-dev.txt
Then run the unittests to see if everything works
python setup.py test Other requirements Windows
This library requires a Microsoft Visual C++ Compiler. For python version 3.5+ you will need Visual C++ 14.0. Install Microsoft Visual Studio and include the “Microsoft Visual C++ Build Tools” which can be downloaded from https://visualstudio.microsoft.com/downloads. Also see https://wiki.python.org/moin/WindowsCompilers
The fastecdsa library is not enabled at this moment in the windows install, the slower ecdsa library is installed. Installation of fastecdsa on Windows is possible but not easy, read https://github.com/AntonKueltz/fastecdsa/issues/11 for steps you could take to install this library.
If you have problems with installing this library on Windows you could try to use the pycryptodome library instead of scrypt. The pycryptodome library is pure Python so it doesn’t need any C compilers installed. But this will run slower. Update Bitcoinlib
Before you update make sure to backup your database! Also backup your settings files in ./bitcoinlib/config if you have made any changes.
If you installed the library with pip upgrade with
$ pip install bitcoinlib --upgrade
Otherwise pull the git repository.
After an update it might be necessary to update the config files. The config files will be overwritten with new versions if you delete the .bitcoinlib/install.log file.
$ rm .bitcoinlib/install.log
If the new release contains database updates you have to migrate the database with the updatedb.py command. This program extracts keys and some wallet information from the old database and then creates a new database. The updatedb.py command is just a helper tool and not guaranteed to work, it might fail if there are a lot of database changes. So backup database / private keys first and use at your own risk!
$ python updatedb.py Wallet and Key data will be copied to new database. Transaction data will NOT be copied Updating database file: /home/guest/.bitcoinlib/database/bitcoinlib.sqlite Old database will be backed up to /home/guest/.bitcoinlib/database/bitcoinlib.sqlite.backup-20180711-01:46 Type 'y' or 'Y' to continue or any other key to cancel: y
Troubleshooting
When you experience issues with the scrypt package when installing you can try to solve this by installing scrypt separately:
$ pip uninstall scrypt $ pip install scrypt
Please make sure you also have the Python development and SSL development packages installed, see ‘Other requirements’ above.
You can also use pycryptodome or pyscrypt instead of scrypt. Pycryptodome is a pure Python scrypt password-based key derivation library. It works but it is slow when using BIP38 password protected keys.
If you run into issues do not hesitate to contact us or file an issue at https://github.com/1200wd/bitcoinlib/issues Using library in other software
If you use the library in other software and want to change file locations and other settings you can specify a location for a config file in the BCL_CONFIG_FILE:
os.environ['BCL_CONFIG_FILE'] = '/var/www/blocksmurfer/bitcoinlib.ini'
Tweak BitcoinLib
You can Add another service Provider to this library by updating settings and write a new service provider class.
If you use this library in a production environment it is advised to run your own Bcoin, Bitcoin, Litecoin or Dash node, both for privacy and reliability reasons. More setup information: Setup connection to bitcoin node
Some service providers require an API key to function or allow additional requests. You can add this key to the provider settings file in .bitcoinlib/providers.json
i made a mistake in the beginning as you may have noticed but this is missing data and its not complete ive had this issue before but ive never said anything ive just fixed the data on my own but i have alot to do at the moment and i cant take the time to fix it this time plus for anyone else who may encounter this same issue i hope it may help them not have to send an issue report to you guys thank you for your time and i look forward to being able to use this soon