python-binance-chain icon indicating copy to clipboard operation
python-binance-chain copied to clipboard

Error when trying to import from binance_chain.environment import BinanceEnvironment

Open ledzgio opened this issue 5 years ago • 3 comments

After installing the library on my environment with Python 3.5.3, I try to import the library as follows (in Python shell):

from binance_chain.environment import BinanceEnvironment

But I get this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vagrant/.local/lib/python3.5/site-packages/binance_chain/environment.py", line 45
    return hash(f"{self.api_url}{self.wss_url}{self.hrp}")
                                                        ^
SyntaxError: invalid syntax

Any idea why?

UPDATE: it is apparently due to f'' string not supported on python 3.5.3, can you confirm this? could you please add support for python 3.5 as well?

UPDATE2: trying it with Python 3.7 but there is an error during the package installation due to libsecp256k1 library. Then I tried to install the package here (as suggested in the readme) https://github.com/ludbb/secp256k1-py#installation but this is not compatible with python 3.7!

I am currently still not able to use the library.

ledzgio avatar Jun 21 '19 08:06 ledzgio

Hey @ledzgio ,

I had similar issues with secp256k. Had to install the lib properly first.

sudo apt-get install lib32ncurses5-dev
sudo add-apt-repository ppa:tah83/secp256k1
sudo apt update
sudo apt install libsecp256k1-dev

try this before pip install python-binance-chain

ScriptProdigy avatar Jun 23 '19 01:06 ScriptProdigy

Hey @ledzgio ,

I had similar issues with secp256k. Had to install the lib properly first.

sudo apt-get install lib32ncurses5-dev
sudo add-apt-repository ppa:tah83/secp256k1
sudo apt update
sudo apt install libsecp256k1-dev

try this before pip install python-binance-chain

It worked, thank you

ledzgio avatar Jun 24 '19 08:06 ledzgio

@sammchardy is there any chance we get this library compatible with Python 3.5?

ledzgio avatar Jun 25 '19 10:06 ledzgio