0

Populus was functioning well until I began getting deprecation warnings. So I did pip uninstall populus and then pip3 install populus. Also installed all required python3 libraries. The install worked but then when I go: populus I get no such file or directory.. And with sudo populus I get command not found :/

It's probably something small pertaining to a switch from python2 to 3. Any ideas as to what's happening

$ populus
/usr/local/lib/python2.7/dist-packages/populus/__init__.py:13: DeprecationWarning: Python 2 support will end during the first quarter of 2018Please upgrade to Python 3https://medium.com/@pipermerriam/dropping-python-2-support-d781e7b48160
  warnings.warn(warn_msg, DeprecationWarning)
/usr/local/lib/python2.7/dist-packages/geth/__init__.py:27: DeprecationWarning: The `py-geth` library is dropping support for Python 2.  Upgrade to Python 3.
  "The `py-geth` library is dropping support for Python 2.  Upgrade to Python 3."

Populus works via old: pip install but when running sudo py.test tests/

plugins: populus-2.2.0
collected 2 items                                                              

tests/test_greeter.py ..                                                 [100%]

=============================== warnings summary ===============================
tests/test_greeter.py::test_greeter
  /usr/local/lib/python3.6/dist-packages/populus/config/web3.py:55: DeprecationWarning: __init__ is deprecated in favor of web3.providers.eth_tester.EthereumTesterProvider
    return self.provider_class(**self.provider_kwargs)
  /usr/local/lib/python3.6/dist-packages/eth_abi/abi.py:92: DeprecationWarning: Automatic inference of hex encoded data has been deprecated. Please adjust your code to ensure that the data argument for `decode_single` is a byte string
    "Automatic inference of hex encoded data has been deprecated. "

tests/test_greeter.py::test_custom_greeting
  /usr/local/lib/python3.6/dist-packages/populus/config/web3.py:55: DeprecationWarning: __init__ is deprecated in favor of web3.providers.eth_tester.EthereumTesterProvider
    return self.provider_class(**self.provider_kwargs)
  /usr/local/lib/python3.6/dist-packages/eth_abi/abi.py:92: DeprecationWarning: Automatic inference of hex encoded data has been deprecated. Please adjust your code to ensure that the data argument for `decode_single` is a byte string
    "Automatic inference of hex encoded data has been deprecated. "

-- Docs: http://doc.pytest.org/en/latest/warnings.html
===================== 2 passed, 4 warnings in 1.09 seconds
  • Populus is not really keeping up with the velocity of other python projects right now. Just not quite enough hands. The best solution I have for you is to ignore deprecation warnings. :/ – carver Feb 6 '18 at 1:44
0

I think the best option is to build populus from source, use the current main branch,

if you use python 3.6 or later and have all the needed geth dependencies for etherium for your platform ,for example on ubuntu 18 need

apt install libsecp256k1-dev

this is a painless experience at least for the build process, see the setup.py for a list of the dependencies.

Very sadly populus is in a state of transition and post build there will be more work to do as there exist some conflicting dependencies, however these are easy to resolve with

sudo pip3 uninstall /install

these are the dependency versions that worked for me on ubuntu 18 with python 3.6

output for `pip3 freeze | grep eth

eth-abi==0.5.0, eth-account==0.3.0,eth-bloom==1.0.0,eth-hash==0.1.4,eth-keyfile==0.5.1,eth-keys==0.1.0b4,eth-rlp==0.1.1,eth-tester==0.1.0b11,eth-testrpc==1.3.0, eth-typing==1.3.0, eth-utils==0.7.1, ethereum==1.6.1, py-geth==2.0.1 , pyethash==0.1.27,

output for pip3 freeze | grep rlp eth-rlp==0.1.1, rlp==0.6.0

web3 version web3==3.16.5

with these dependencies everything worked

also if you are not aware after populus init you need to copy the generated config file in the init commands output as 'project.json' to the root directory of your development folder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.