greenaddress / garecovery

GreenAddress recovery tool for 2of2 and 2of3 wallets
MIT License
109 stars 53 forks source link

Build wheel for wallycore error #36

Closed AbdulRazak-Naeate closed 3 years ago

AbdulRazak-Naeate commented 3 years ago

please I run the below code and this the error that shows i need assistance in fixing it

nindoo@NaeateStudios:~/garecovery$ pip3 install --require-hashes -r tools/requirements.txt Ignoring wallycore: markers '"linux" in sys_platform and python_version == "3.6"' don't match your environment Ignoring wallycore: markers '"linux" in sys_platform and python_version == "3.7"' don't match your environment Ignoring wallycore: markers 'sys_platform == "darwin" and python_version == "3.7"' don't match your environment Ignoring wallycore: markers 'sys_platform == "win32" and python_version == "3.6"' don't match your environment Collecting https://github.com/ElementsProject/libwally-core/archive/release_0.8.0.tar.gz (from -r tools/requirements.txt (line 8)) Downloading https://github.com/ElementsProject/libwally-core/archive/release_0.8.0.tar.gz | 1.1 MB 106 kB/s Collecting argcomplete==1.8.2 Downloading argcomplete-1.8.2-py2.py3-none-any.whl (34 kB) Collecting python-bitcoinrpc==1.0 Downloading python-bitcoinrpc-1.0.tar.gz (13 kB) Building wheels for collected packages: python-bitcoinrpc, wallycore Building wheel for python-bitcoinrpc (setup.py) ... done Created wheel for python-bitcoinrpc: filename=python_bitcoinrpc-1.0-py3-none-any.whl size=14246 sha256=4b2943393ad9316c909c0e29abc9ab6aff4a16fc709a9f2b85f4564e9d3f9c7e Stored in directory: /home/nindoo/.cache/pip/wheels/12/8b/0e/d0052bafa0c5b98836eb8b5a9fe3c3eb02cc29966ec60379d4 Building wheel for wallycore (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-req-build-4w37gtke/setup.py'"'"'; file='"'"'/tmp/pip-req-build-4w37gtke/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-p0mpcp75 cwd: /tmp/pip-req-build-4w37gtke/ Complete output (6 lines): running bdist_wheel running build running build_py Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /mingw/share/autoconf /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /mnt/c/MinGW/bin/autoreconf-2.68 line 40. BEGIN failed--compilation aborted at /mnt/c/MinGW/bin/autoreconf-2.68 line 40. error: [Errno 2] No such file or directory: './configure'

ERROR: Failed building wheel for wallycore Running setup.py clean for wallycore Successfully built python-bitcoinrpc Failed to build wallycore ERROR: Error checking for conflicts. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2683, in version return self._version File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2817, in getattr raise AttributeError(attr) AttributeError: _version

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 543, in _warn_about_conflicts package_set, _dep_info = check_install_conflicts(to_install) File "/usr/lib/python3/dist-packages/pip/_internal/operations/check.py", line 116, in check_install_conflicts would_be_installed = _simulate_installation_of(to_install, package_set) File "/usr/lib/python3/dist-packages/pip/_internal/operations/check.py", line 143, in _simulate_installation_of package_set[name] = PackageDetails(dist.version, dist.requires()) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2691, in version raise ValueError(msg, self) ValueError: ("Missing 'Version:' header and/or PKG-INFO file at path: /tmp/pip-req-build-4w37gtke/pip-egg-info/wallycore.egg-info/PKG-INFO", wallycore [unknown version] (/tmp/pip-req-build-4w37gtke/pip-egg-info)) Installing collected packages: argcomplete, python-bitcoinrpc, wallycore Running setup.py install for wallycore ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-4w37gtke/setup.py'"'"'; file='"'"'/tmp/pip-req-build-4w37gtke/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-8_n8j0m6/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/nindoo/.local/include/python3.8/wallycore cwd: /tmp/pip-req-build-4w37gtke/ Complete output (6 lines): running install running build running build_py Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /mingw/share/autoconf /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /mnt/c/MinGW/bin/autoreconf-2.68 line 40. BEGIN failed--compilation aborted at /mnt/c/MinGW/bin/autoreconf-2.68 line 40. error: [Errno 2] No such file or directory: './configure'

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-4w37gtke/setup.py'"'"'; file='"'"'/tmp/pip-req-build-4w37gtke/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-8_n8j0m6/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/nindoo/.local/include/python3.8/wallycore Check the logs for full command output.

jgriffiths commented 3 years ago

Hi, it seems you are trying to install garecovery under cygwin? I'm not sure if that is supported, you should be able to install under a regular windows environment, please give that a try.

AbdulRazak-Naeate commented 3 years ago

I am using linux Ubuntu app that I installed from windows app store .

jgriffiths commented 3 years ago

If you want to use linux under windows you will need to use a virtual machine most likely, e.g. https://www.oracle.com/virtualization/technologies/vm/downloads/virtualbox-downloads.html.

AbdulRazak-Naeate commented 3 years ago

I try installing VirtualBox on my computer and install ubuntu 20.4.1and am getting the same results. Please I new to sudo commands and python-pip, I may be doing something wrong please guide me on the steps involved in installing any pip package and the green recovery tool which I need to use now .

jgriffiths commented 3 years ago

Hi,

The below is adapted from the README (since pip has recently changed and broken dependencies). Please try the following in a new shell in the green-cli directory:

$ sudo apt-get update -qq
$ sudo apt-get install python3-pip python3-dev build-essential python3-virtualenv -yqq
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install --use-deprecated=legacy-resolver  -r requirements.txt
$ pip install .
$ garecovery-cli --help
AbdulRazak-Naeate commented 3 years ago

I tried it and got no such option: --use-deprecated ERROR nindoo@NaeateStudios:~$ git clone https://github.com/greenaddress/garecovery.git Cloning into 'garecovery'... remote: Enumerating objects: 95, done. remote: Counting objects: 100% (95/95), done. remote: Compressing objects: 100% (50/50), done. remote: Total 713 (delta 46), reused 79 (delta 45), pack-reused 618 Receiving objects: 100% (713/713), 335.36 KiB | 732.00 KiB/s, done. Resolving deltas: 100% (423/423), done. nindoo@NaeateStudios:~$ cd garecovery nindoo@NaeateStudios:~/garecovery$ sudo apt-get update -qq nindoo@NaeateStudios:~/garecovery$ sudo apt-get install python3-pip python3-dev build-essential python3-virtualenv -yqq nindoo@NaeateStudios:~/garecovery$ virtualenv -p python3 venv created virtual environment CPython3.8.5.final.0-64 in 27849ms creator CPython3Posix(dest=/home/nindoo/garecovery/venv, clear=False, global=False) seeder FromAppData(download=False, appdirs=latest, CacheControl=latest, certifi=latest, chardet=latest, colorama=latest, contextlib2=latest, distlib=latest, distro=latest, html5lib=latest, idna=latest, ipaddr=latest, lockfile=latest, msgpack=latest, packaging=latest, pep517=latest, pip=latest, pkg_resources=latest, progress=latest, pyparsing=latest, pytoml=latest, requests=latest, retrying=latest, setuptools=latest, six=latest, urllib3=latest, webencodings=latest, wheel=latest, via=copy, app_data_dir=/home/nindoo/.local/share/virtualenv/seed-app-data/v1.0.1.debian) activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator nindoo@NaeateStudios:~/garecovery$ source venv/bin/activate (venv) nindoo@NaeateStudios:~/garecovery$ pip install --use-deprecated=legacy-resolver -r requirements.txt

Usage: pip install [options] [package-index-options] ... pip install [options] -r [package-index-options] ... pip install [options] [-e] ... pip install [options] [-e] ... pip install [options] <archive url/path> ...

no such option: --use-deprecated (venv) nindoo@NaeateStudios:~/garecovery$

jgriffiths commented 3 years ago

Thanks, it seems your pip install doesn't have the broekn dependency resolver yet, but your python version is 3.8 which we don't yet release binary wheels for. please try python 3.7:

$ sudo apt-get update -qq
$ sudo apt-get install python3.7-pip python3.7-dev build-essential python3.7-virtualenv -yqq
$ virtualenv -p python3.7 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ pip install .
$ garecovery-cli --help
AbdulRazak-Naeate commented 3 years ago

when I run sudo apt-get install python3.7-pip python3.7-dev build-essential python3.7-virtualenv -yqq This the error i get E: Unable to locate package python3.7-pip E: Couldn't find any package by glob 'python3.7-pip' E: Couldn't find any package by regex 'python3.7-pip' E: Unable to locate package python3.7-virtualenv E: Couldn't find any package by glob 'python3.7-virtualenv' E: Couldn't find any package by regex 'python3.7-virtualenv' (venv) nindoo@NaeateStudios:~/garecovery$

I fellow this link on google and able to install python3.7 manually https://websiteforstudents.com/installing-the-latest-python-3-7-on-ubuntu-16-04-18-04/

After that running garecovery-cli --help I got the fellowing error

Traceback (most recent call last): File "/home/nindoo/garecovery/venv/lib/python3.7/site-packages/wallycore/init.py", line 13, in swig_import_helper return importlib.import_module(mname) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 670, in _load_unlocked File "", line 583, in module_from_spec File "", line 1043, in create_module File "", line 219, in _call_with_frames_removed ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/nindoo/garecovery/venv/bin/garecovery-cli", line 5, in from garecovery import recoverycli File "/home/nindoo/garecovery/venv/lib/python3.7/site-packages/garecovery/recoverycli.py", line 5, in import wallycore as wally File "/home/nindoo/garecovery/venv/lib/python3.7/site-packages/wallycore/init.py", line 16, in libwallycore = swig_import_helper() File "/home/nindoo/garecovery/venv/lib/python3.7/site-packages/wallycore/init.py", line 15, in swig_import_helper return importlib.import_module('libwallycore') File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory (venv) nindoo@NaeateStudios:~/garecovery$

AbdulRazak-Naeate commented 3 years ago

I fix it by using the first method of manual installation in the link i provided .

jgriffiths commented 3 years ago

Hi @AbdulRazak-Naeate thanks for updating, that that mean you are able to run the recovery tool now?

AbdulRazak-Naeate commented 3 years ago

Yes the tool it's running now .I learn that the coins would be sent to a private key I need More understanding on it , which key and how can spend the coins. Thank you

jgriffiths commented 3 years ago

Thanks for reporting back.

The private key is one derived from your mnemonic and is present in the .csv file the tool creates. You can import or sweep this key into any bitcoin wallet that supports this (e.g. in green you can sweep the funds into a new wallet, in Bitcoin core you can import the private key).

Closing this issue now, if you need further help please contact support through https://help.blockstream.com, thanks.

raucao commented 3 years ago

when I run sudo apt-get install python3.7-pip python3.7-dev build-essential python3.7-virtualenv -yqq This the error i get E: Unable to locate package python3.7-pip E: Couldn't find any package by glob 'python3.7-pip' E: Couldn't find any package by regex 'python3.7-pip' E: Unable to locate package python3.7-virtualenv E: Couldn't find any package by glob 'python3.7-virtualenv' E: Couldn't find any package by regex 'python3.7-virtualenv'

Same here, so this issue should actually still be open I think, as it will happen for everyone on a stable Ubuntu 20.04 LTS release.

AbdulRazak-Naeate commented 3 years ago

You need to install python3 manually please fellow the link i provided earlier.

raucao commented 3 years ago

Yes, I realize that. I'm just saying, with current Ubuntu LTS, this repo's README instructions do not work.

Also, now I'm running into a different issue after having installed 3.7 manually:

    running install_lib                                                                                                                                                      
    Traceback (most recent call last):                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                   
      File "/tmp/pip-req-build-xs_5bmj1/setup.py", line 18, in <module>                                                                                                      
        zip_safe=False)                                                                                                                                                      
      File "/home/basti/src/garecovery/venv/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 "/home/basti/src/garecovery/venv/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run                                                      
        return orig.install.run(self)                                                                                                                                        
      File "/usr/local/lib/python3.7/distutils/command/install.py", line 557, in run                                                                                         
        self.run_command(cmd_name)                                                                                                                                           
      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 984, in run_command                                                                                            
        cmd_obj.ensure_finalized()                                                                                                                                           
      File "/usr/local/lib/python3.7/distutils/cmd.py", line 107, in ensure_finalized                                                                                        
        self.finalize_options()                                                                                                                                              
      File "/home/basti/src/garecovery/venv/lib/python3.7/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options                                     
        self.set_undefined_options('install',('install_layout','install_layout'))                                                                                            
      File "/usr/local/lib/python3.7/distutils/cmd.py", line 290, in set_undefined_options                                                                                   
        setattr(self, dst_option, getattr(src_cmd_obj, src_option))                                                                                                          
      File "/usr/local/lib/python3.7/distutils/cmd.py", line 103, in __getattr__
        raise AttributeError(attr)                                                    
    AttributeError: install_layout

For some reason, I had it working briefly before, but then running the actual recovery CLI failed with:

Traceback (most recent call last):
  File "/home/basti/src/garecovery/venv/lib/python3.7/site-packages/wallycore/__init__.py", line 13, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 583, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1043, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
AbdulRazak-Naeate commented 3 years ago

There are two options to use in installing the python3 in the link i provided .Did you use the first option because that's what I used and fix my problem .Also try and uninstall python3 you just installed and reinstall with the first option.

raucao commented 3 years ago

Yes, Python 3.7 compiled and installed just fine.

AbdulRazak-Naeate commented 3 years ago

I are you using Windows Ubuntu App or Ubuntu on a virtual box on windows ? If it's Ubuntu App please try using Ubuntu OS in virtual box.

raucao commented 3 years ago

It's Ubuntu Server, installed from the normal KVM cloud image.

jgriffiths commented 3 years ago

Hi @raucao please raise a new issue with the steps you took to install and the error you are getting, thanks.

raucao commented 3 years ago

It's the same issue as this one. The original installation error caused me to find this issue and subsequently install Python 3.7 from source. The Python install went fine, and now I'm faced with the other issues I added here.

I think it would make sense to provide working installation instructions for current Ubuntu LTS (20.04, which is kind of what I expected from Ubuntu being documented specifically).

jgriffiths commented 3 years ago

We will be providing our software on PyPI directly once we have that working, so will update the install instructions then. We will update the requirements file to support python 3.8 soon also which should fix ubuntu (in that you wont need to install 3.7).

In the meantime could you try updating setuptools in your virtualenv? pip install --upgrade setuptools.

raucao commented 3 years ago

We will be providing our software on PyPI directly once we have that working, so will update the install instructions then. We will update the requirements file to support python 3.8 soon also which should fix ubuntu (in that you wont need to install 3.7).

Great, thanks!

In the meantime could you try updating setuptools in your virtualenv? pip install --upgrade setuptools.

Unfortunately, I already tried that multiple times. No hurry, I can wait until 3.8 is supported officially. Thanks.

jgriffiths commented 3 years ago

Googling suggests making sure you have installed libpython3.7 and also setting LD_LIBRARY_PATH to /path/to/libpython/directory for 3.7 may be required as well.