decred / tinydecred

Python tools for Decred
ISC License
27 stars 14 forks source link

incompatible package and question regarding new (offline) wallet creation #193

Open glints opened 3 years ago

glints commented 3 years ago

When I install this package (in conda) with pip install decred I get the following notice:

two1 3.10.9 has requirement base58==0.2.2, but you'll have base58 2.0.1 which is incompatible.

When trying the example, creating a wallet on testnet, the mnemonic seed list is empty... So I'm guessing this is related to the incompatible package.

Now, I was hoping to find a function in tinydecred, that would allow to create just a mnemonic with private key and address, without all the overhead.

To create batch operations in cold wallets this seems essential (without having to use GO), so I hope I can get some pointers on what functionality that is required (and maybe already present here) to create this.

buck54321 commented 3 years ago

I've never actually tested compatibility with Anaconda. Sounds like either Anaconda ships with a base58 that's newer, or you have another package installed that has a conflicting version requirement. 2.0.1 is the most up-to-date for the base58 package on PyPI, and we can probably upgrade. Lemme look into it.

buck54321 commented 3 years ago

Ah. I see now. We require >= 2.0.0, but another package two1 requires exactly 0.2.2 which is from 2015.

It looks like Anaconda has some tools to isolate projects and prevent this type of thing.

https://www.activestate.com/resources/quick-reads/how-to-manage-python-dependencies-with-conda/

If you can do without the two1 package in the project that you're using decred, you can probably make it work.

glints commented 3 years ago

I've created a new conda environment, but get the following error:

$ pip install decred Collecting decred Using cached decred-0.1.0.tar.gz (1.1 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Collecting pynacl<2.0.0,>=1.3.0 Using cached PyNaCl-1.4.0-cp35-abi3-macosx_10_10_x86_64.whl (380 kB) Collecting websocket_client<0.58.0,>=0.57.0 Using cached websocket_client-0.57.0-py2.py3-none-any.whl (200 kB) Processing /Users/elvisglints/Library/Caches/pip/wheels/44/e0/b8/a8cd4b9edfb510c4d37c9fe79d96c8d86ee0403ca3316e329c/blake256-0.1.1-py3-none-any.whl Collecting base58<3.0.0,>=2.0.0 Using cached base58-2.0.1-py3-none-any.whl (4.3 kB) Collecting appdirs<2.0.0,>=1.4.3 Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) Collecting cffi>=1.4.1 Using cached cffi-1.14.3-2-cp39-cp39-macosx_10_9_x86_64.whl (176 kB) Collecting six Using cached six-1.15.0-py2.py3-none-any.whl (10 kB) Collecting pycparser Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB) Building wheels for collected packages: decred Building wheel for decred (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /anaconda3/envs/tinydecred/bin/python /anaconda3/envs/tinydecred/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/tmp49gq0cqx cwd: /private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-install-qr1_qmth/decred Complete output (25 lines): A setup.py file already exists. Using it. Traceback (most recent call last): File "/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-install-qr1_qmth/decred/setup.py", line 2, in from setuptools import setup ModuleNotFoundError: No module named 'setuptools' Traceback (most recent call last): File "/anaconda3/envs/tinydecred/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in main() File "/anaconda3/envs/tinydecred/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/anaconda3/envs/tinydecred/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-build-env-g4a1245p/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 57, in build_wheel return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory))) File "/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-build-env-g4a1245p/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 59, in make_in wb.build() File "/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-build-env-g4a1245p/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 89, in build self._build(zip_file) File "/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-build-env-g4a1245p/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 121, in _build self._run_build_command(setup) File "/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-build-env-g4a1245p/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 149, in _run_build_command subprocess.check_call( File "/anaconda3/envs/tinydecred/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/anaconda3/envs/tinydecred/bin/python', '/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-install-qr1_qmth/decred/setup.py', 'build', '-b', '/private/var/folders/js/5j9t5qsj4tv8f6p_t1ck2x8h0000gn/T/pip-install-qr1_qmth/decred/build']' returned non-zero exit status 1.

ERROR: Failed building wheel for decred Failed to build decred ERROR: Could not build wheels for decred which use PEP 517 and cannot be installed directly

I then tried to install PEP517, but the problem persists.