Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve v4 dependencies #1321

Closed
kclowes opened this issue Apr 10, 2019 · 14 comments
Closed

Resolve v4 dependencies #1321

kclowes opened this issue Apr 10, 2019 · 14 comments

Comments

@kclowes
Copy link
Collaborator

kclowes commented Apr 10, 2019

  • Version: 4.9.1

What was wrong?

web3 4.9.1 requires eth-abi<2.0.0,>=1.2.0
eth-tester 0.1.0b37 requires eth-abi<3.0.0,>=2.0.0b4

How can it be fixed?

Figure out what packages can be upgraded/downgraded to get rid of pip errors without breaking anything

@carver
Copy link
Collaborator

carver commented Apr 10, 2019

Note that Web3 v4.9.1 pins eth-tester to v0.1.0-beta.33: https://github.com/ethereum/web3.py/blob/v4.9.1/setup.py#L10

I'm not sure how they ended up with eth-tester beta.37

@veox
Copy link
Contributor

veox commented Apr 10, 2019

I'm not sure how they ended up with eth-tester beta.37

Perhaps tracking git master at first; then checking out web3.py v4.9.1, but not re-running pip install <bla>?..


Tried cleanroom install (CPython 3.7.3, python-virtualenv 16.1.0, python-pip 19.0.3 via Arch Linux package manager):

mkdir web3.py-test-issue-1321
cd web3.py-test-issue-1321
virtualenv .virtualenv/web3.py-test-issue-1321
source .virtualenv/*/bin/activate
pip install web3==4.9.1
pip freeze > a

Here cat a:

attrdict==2.0.1
certifi==2019.3.9
chardet==3.0.4
cytoolz==0.9.0.1
eth-abi==1.3.0
eth-account==0.3.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.1
eth-rlp==0.1.2
eth-typing==2.1.0
eth-utils==1.4.1
hexbytes==0.1.0
idna==2.8
lru-dict==1.1.6
parsimonious==0.8.1
pycryptodome==3.8.1
requests==2.21.0
rlp==1.1.0
six==1.12.0
toolz==0.9.0
urllib3==1.24.1
web3==4.9.1
websockets==6.0

No eth-tester. :/

So:

pip install eth-tester
pip freeze > b

Here diff a b:

5c5
< eth-abi==1.3.0
---
> eth-abi==2.0.0b8
10a11
> eth-tester==0.1.0b38
19a21
> semantic-version==2.6.0

Not same numbers as in original report. :/


Need steps to reproduce.

@veox
Copy link
Contributor

veox commented Apr 10, 2019

This a workaround for now:

mkdir web3.py-test-issue-1321                                                                       [veox]
cd web3.py-test-issue-1321
virtualenv .virtualenv/web3.py-test-issue-1321
source .virtualenv/*/bin/activate
pip install web3==4.9.1 eth-tester==v0.1.0-beta.33
pip freeze > a

Here cat a:

attrdict==2.0.1
certifi==2019.3.9
chardet==3.0.4
cytoolz==0.9.0.1
eth-abi==1.3.0
eth-account==0.3.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.1
eth-rlp==0.1.2
eth-tester==0.1.0b33
eth-typing==2.1.0
eth-utils==1.4.1
hexbytes==0.1.0
idna==2.8
lru-dict==1.1.6
parsimonious==0.8.1
pycryptodome==3.8.1
requests==2.21.0
rlp==1.1.0
semantic-version==2.6.0
six==1.12.0
toolz==0.9.0
urllib3==1.24.1
web3==4.9.1
websockets==6.0

@relyt29
Copy link
Contributor

relyt29 commented Apr 10, 2019

history | grep pip
(standard input):10110:10110  pip install eth-tester web3 
(standard input):10116:10116  pip install eth-tester[py-evm]

I am also on Arch Linux.

(venv) ➜  ERC20 git:(master) ✗ pip --version
pip 18.1 from /home/<redacted>/venv/lib/python3.7/site-packages/pip (python 3.7)
(venv) ➜  ERC20 git:(master) ✗ python --version
Python 3.7.2
(venv) ➜  ERC20 git:(master) ✗ history | grep venv
(standard input):10105:10105  python3 -m venv ./venv
(standard input):10106:10106  source venv/bin/activate

happy to assist in any way I can.

@relyt29
Copy link
Contributor

relyt29 commented Apr 10, 2019

From a fresh virtualenv:

➜  redacted git:(master) ✗ python3 -m venv ./venv
➜  redacted git:(master) ✗ source venv/bin/activate
(venv) ➜  redacted git:(master) ✗ ls
backdoors  entropy  ERC20  venv
(venv) ➜  redacted git:(master) ✗ cd ERC20
(venv) ➜  ERC20 git:(master) ✗ pip install web3==4.9.1
Collecting web3==4.9.1
  Using cached https://files.pythonhosted.org/packages/9d/df/0bfb618ff309ef9f2014e829daf689c13d0652534002d8dff8615b92946b/web3-4.9.1-py3-none-any.whl
Collecting requests<3.0.0,>=2.16.0 (from web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Collecting cytoolz<1.0.0,>=0.9.0; implementation_name == "cpython" (from web3==4.9.1)
Collecting lru-dict<2.0.0,>=1.1.6 (from web3==4.9.1)
Collecting websockets<7.0.0,>=6.0.0 (from web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/0c/6a/d048dfe820fc956e57bb1115f5eda5a1bef320172811f72c9924c8d6ebb5/websockets-6.0-cp37-cp37m-manylinux1_x86_64.whl
Collecting hexbytes<1.0.0,>=0.1.0 (from web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/18/bd/21697d93ee2153c8c12253262b740f571e94341d4cee411504032fff3f56/hexbytes-0.1.0-py3-none-any.whl
Collecting eth-abi<2.0.0,>=1.2.0 (from web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/e9/ef/5af786a32ae7ac3aece6489400ea2cee6b2ede7a7b3955e6f55a59442d12/eth_abi-1.3.0-py3-none-any.whl
Collecting eth-utils<2.0.0,>=1.2.0 (from web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/91/c8/0ef940843b45377a8d150c94fa8d147607180e89f5d604d3a2be646d9d96/eth_utils-1.4.1-py3-none-any.whl
Collecting eth-account<0.4.0,>=0.2.1 (from web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/a3/d8/6118bc0e00d6ec092bb02b012989d1018893755eb84da53266412ac359e3/eth_account-0.3.0-py3-none-any.whl
Collecting eth-hash[pycryptodome]<1.0.0,>=0.2.0 (from web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/0d/d8/0f0c8d4ccaa4c8d25524fd1ed9f5c6d9551b52b74b973f338de3f0a23111/eth_hash-0.2.0-py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests<3.0.0,>=2.16.0->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.16.0->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests<3.0.0,>=2.16.0->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests<3.0.0,>=2.16.0->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting toolz>=0.8.0 (from cytoolz<1.0.0,>=0.9.0; implementation_name == "cpython"->web3==4.9.1)
Collecting eth-typing<3.0.0,>=2.0.0 (from eth-abi<2.0.0,>=1.2.0->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/3e/8e/45c4779d98e43c166738a606b021f32a7a70c4c0d8c524c28f0703325409/eth_typing-2.1.0-py3-none-any.whl
Collecting parsimonious<0.9.0,>=0.8.0 (from eth-abi<2.0.0,>=1.2.0->web3==4.9.1)
Collecting eth-keys<0.3.0,>=0.2.0b3 (from eth-account<0.4.0,>=0.2.1->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/3e/4f/a11b4624b4e5d346fd512d190c0d7410ac8c384ef1cb8b681cc4164a26d8/eth_keys-0.2.1-py3-none-any.whl
Collecting eth-rlp<1,>=0.1.2 (from eth-account<0.4.0,>=0.2.1->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/56/4b/b309fb44dd9bb975e84f3d626392eec1eeed0108e55a51cd7dd8956a73ad/eth_rlp-0.1.2-py3-none-any.whl
Collecting eth-keyfile<0.6.0,>=0.5.0 (from eth-account<0.4.0,>=0.2.1->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/eb/a5/3615d100b62fbf20fe5d5c0d1d4d7326eac861d260b0cd2a36af2bf8ccb1/eth_keyfile-0.5.1-py3-none-any.whl
Collecting attrdict<3,>=2.0.0 (from eth-account<0.4.0,>=0.2.1->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/ef/97/28fe7e68bc7adfce67d4339756e85e9fcf3c6fd7f0c0781695352b70472c/attrdict-2.0.1-py2.py3-none-any.whl
Collecting pycryptodome<4,>=3.6.6; extra == "pycryptodome" (from eth-hash[pycryptodome]<1.0.0,>=0.2.0->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/c6/01/f108f9cfb0af904db3d6c318fa4ed7b93f9d914a5c1a71ca46286e3635a8/pycryptodome-3.8.1-cp37-cp37m-manylinux1_x86_64.whl
Collecting six>=1.9.0 (from parsimonious<0.9.0,>=0.8.0->eth-abi<2.0.0,>=1.2.0->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting rlp<2,>=0.6.0 (from eth-rlp<1,>=0.1.2->eth-account<0.4.0,>=0.2.1->web3==4.9.1)
  Using cached https://files.pythonhosted.org/packages/54/d4/3013691b8c4702cb1c3253be643f2cef12e9bee93e134694e6dab83f41e2/rlp-1.1.0-py2.py3-none-any.whl
Installing collected packages: urllib3, certifi, chardet, idna, requests, toolz, cytoolz, lru-dict, websockets, eth-typing, pycryptodome, eth-hash, eth-utils, hexbytes, six, parsimonious, eth-abi, eth-keys, rlp, eth-rlp, eth-keyfile, attrdict, eth-account, web3
Successfully installed attrdict-2.0.1 certifi-2019.3.9 chardet-3.0.4 cytoolz-0.9.0.1 eth-abi-1.3.0 eth-account-0.3.0 eth-hash-0.2.0 eth-keyfile-0.5.1 eth-keys-0.2.1 eth-rlp-0.1.2 eth-typing-2.1.0 eth-utils-1.4.1 hexbytes-0.1.0 idna-2.8 lru-dict-1.1.6 parsimonious-0.8.1 pycryptodome-3.8.1 requests-2.21.0 rlp-1.1.0 six-1.12.0 toolz-0.9.0 urllib3-1.24.1 web3-4.9.1 websockets-6.0
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(venv) ➜  ERC20 git:(master) ✗ python run_tests2.py
Traceback (most recent call last):
  File "run_tests2.py", line 2, in <module>
    from eth_tester import EthereumTester, PyEVMBackend
ModuleNotFoundError: No module named 'eth_tester'
(venv) ➜  ERC20 git:(master) ✗ pip install web3==4.9.1
(venv) ➜  ERC20 git:(master) ✗ pip install eth-tester
Collecting eth-tester
  Downloading https://files.pythonhosted.org/packages/de/fc/57d35da4d9d6bca7b87025c31d78a4e5d81892a47809098c6c08699d6332/eth_tester-0.1.0b38-py3-none-any.whl (59kB)
    100% |████████████████████████████████| 61kB 913kB/s 
Requirement already satisfied: rlp<2.0.0,>=1.1.0 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from eth-tester) (1.1.0)
Collecting eth-abi<3.0.0,>=2.0.0b4 (from eth-tester)
  Using cached https://files.pythonhosted.org/packages/23/ec/d386d186e25e48b7e451a2eebefcc6b5c5c75757d62c2dbc43bb81edcbf7/eth_abi-2.0.0b8-py3-none-any.whl
Requirement already satisfied: eth-keys<0.3.0,>=0.2.1 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from eth-tester) (0.2.1)
Collecting semantic-version<3.0.0,>=2.6.0 (from eth-tester)
  Using cached https://files.pythonhosted.org/packages/28/be/3a7241d731ba89063780279a5433f5971c1cf41735b64a9f874b7c3ff995/semantic_version-2.6.0-py3-none-any.whl
Requirement already satisfied: eth-utils<2.0.0,>=1.4.1 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from eth-tester) (1.4.1)
Requirement already satisfied: eth-typing<3.0.0,>=2.0.0 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from eth-abi<3.0.0,>=2.0.0b4->eth-tester) (2.1.0)
Requirement already satisfied: parsimonious<0.9.0,>=0.8.0 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from eth-abi<3.0.0,>=2.0.0b4->eth-tester) (0.8.1)
Requirement already satisfied: eth-hash<1.0.0,>=0.1.0 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from eth-utils<2.0.0,>=1.4.1->eth-tester) (0.2.0)
Requirement already satisfied: cytoolz<1.0.0,>=0.8.2; implementation_name == "cpython" in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from eth-utils<2.0.0,>=1.4.1->eth-tester) (0.9.0.1)
Requirement already satisfied: six>=1.9.0 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from parsimonious<0.9.0,>=0.8.0->eth-abi<3.0.0,>=2.0.0b4->eth-tester) (1.12.0)
Requirement already satisfied: toolz>=0.8.0 in /home/redacted/redacted/redacted/redacted/redacted/venv/lib/python3.7/site-packages (from cytoolz<1.0.0,>=0.8.2; implementation_name == "cpython"->eth-utils<2.0.0,>=1.4.1->eth-tester) (0.9.0)
web3 4.9.1 has requirement eth-abi<2.0.0,>=1.2.0, but you'll have eth-abi 2.0.0b8 which is incompatible.
Installing collected packages: eth-abi, semantic-version, eth-tester
  Found existing installation: eth-abi 1.3.0
    Uninstalling eth-abi-1.3.0:
      Successfully uninstalled eth-abi-1.3.0
Successfully installed eth-abi-2.0.0b8 eth-tester-0.1.0b38 semantic-version-2.6.0
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(venv) ➜  ERC20 git:(master) ✗ 

(observe the line: web3 4.9.1 has requirement eth-abi<2.0.0,>=1.2.0, but you'll have eth-abi 2.0.0b8 which is incompatible.)

@carver
Copy link
Collaborator

carver commented Apr 10, 2019

@veox

No eth-tester. :/

Yeah, it's in an extra, because eth-tester isn't needed by many installs, and is fairly weighty.


@relyt29

(standard input):10110:10110 pip install eth-tester web3

Oh yeah, that would do it. You can't generally assume that the latest stable web3 will support the latest eth-tester beta. So if you want to use eth-tester through web3, then you should use the extra that's pinned in web3:

pip install "web3[tester]"

Looks like this line ^ would improve the docs here: https://web3py.readthedocs.io/en/stable/providers.html#ethereumtesterprovider

@relyt29

This comment has been minimized.

@relyt29

This comment has been minimized.

relyt29 added a commit to relyt29/web3.py that referenced this issue Apr 12, 2019
relyt29 added a commit to relyt29/web3.py that referenced this issue Apr 12, 2019
relyt29 added a commit to relyt29/web3.py that referenced this issue Apr 17, 2019
kclowes pushed a commit that referenced this issue May 8, 2019
@wolovim wolovim closed this as completed Feb 25, 2021
@juancresc
Copy link

still getting this
ERROR: eth-rlp 0.3.0 has requirement eth-utils<3,>=2.0.0, but you'll have eth-utils 1.10.0 which is incompatible.

@kclowes
Copy link
Collaborator Author

kclowes commented Jan 26, 2022

@juancrescente try again in a fresh virtual environment, and please raise a new issue if there is still something wrong.

@PJ-Finlay
Copy link

With a fresh virtual environment I'm still getting this issue.

$ pip install web3

...

ERROR: eth-rlp 0.3.0 has requirement eth-utils<3,>=2.0.0, but you'll have eth-utils 1.10.0 which is incompatible.

Python 3.8.10
Ubuntu 20.04

@slimshreydy
Copy link

Also getting this same issue. It prevents things like pip-compile from operating, since most of the packages used here require eth-utils < 2, but eth-rlp requires eth-utils >= 2. Could eth-rlp possibly be downgraded?

Here's the output of pip compile:

python -m piptools compile --quiet --no-emit-index-url requirements/base.in
Could not find a version that matches eth-utils<2,<3,>=1.0.0-beta.1,>=1.0.2,>=1.2.0,>=1.3.0,>=1.8.2,>=1.9.5,>=2.0.0 (from eth-abi==2.1.1->web3==5.28.0->-r requirements/base.in (line 7))
Tried: 0.7.0, 0.7.0, 0.7.1, 0.7.1, 0.7.2, 0.7.2, 0.7.3, 0.7.3, 0.7.4, 0.7.4, 0.8.0, 0.8.0, 0.8.1, 0.8.1, 1.0.1, 1.0.1, 1.0.2, 1.0.2, 1.0.3, 1.0.3, 1.1.1, 1.1.1, 1.1.2, 1.1.2, 1.2.0, 1.2.0, 1.2.1, 1.2.1, 1.2.2, 1.2.2, 1.3.0, 1.3.0, 1.4.0, 1.4.0, 1.4.1, 1.4.1, 1.5.0, 1.5.0, 1.5.1, 1.5.1, 1.5.2, 1.5.2, 1.6.0, 1.6.0, 1.6.1, 1.6.1, 1.6.2, 1.6.2, 1.6.3, 1.6.3, 1.6.4, 1.6.4, 1.7.0, 1.7.0, 1.8.0, 1.8.0, 1.8.1, 1.8.1, 1.8.2, 1.8.2, 1.8.3, 1.8.3, 1.8.4, 1.8.4, 1.9.0, 1.9.0, 1.9.2, 1.9.2, 1.9.3, 1.9.3, 1.9.4, 1.9.4, 1.9.5, 1.9.5, 1.10.0, 1.10.0, 2.0.0, 2.0.0
Skipped pre-versions: 1.0.0b1, 1.0.0b1, 1.0.0b2, 1.0.0b2, 1.3.0b0, 2.0.0a0, 2.0.0a0
There are incompatible versions in the resolved dependencies:
  eth-utils<2,>=1.0.2 (from rlp==2.0.1->eth-account==0.5.7->web3==5.28.0->-r requirements/base.in (line 7))
  eth-utils<2.0.0,>=1.9.5 (from web3==5.28.0->-r requirements/base.in (line 7))
  eth-utils<2,>=1.3.0 (from eth-account==0.5.7->web3==5.28.0->-r requirements/base.in (line 7))
  eth-utils<2.0.0,>=1.2.0 (from eth-abi==2.1.1->web3==5.28.0->-r requirements/base.in (line 7))
  eth-utils<3,>=2.0.0 (from eth-rlp==0.3.0->eth-account==0.5.7->web3==5.28.0->-r requirements/base.in (line 7))
  eth-utils<2.0.0,>=1.0.0-beta.1 (from eth-keyfile==0.5.1->eth-account==0.5.7->web3==5.28.0->-r requirements/base.in (line 7))
  eth-utils<2.0.0,>=1.8.2 (from eth-keys==0.3.4->eth-account==0.5.7->web3==5.28.0->-r requirements/base.in (line 7))

@kclowes
Copy link
Collaborator Author

kclowes commented Mar 2, 2022

Make sure you have the latest version of pip: pip install --upgrade pip. And if that doesn't work, please open a new issue.

@N-NeelPatel
Copy link

With a fresh virtual environment I'm still getting this issue.

$ pip install web3

...

ERROR: eth-rlp 0.3.0 has requirement eth-utils<3,>=2.0.0, but you'll have eth-utils 1.10.0 which is incompatible.

Python 3.8.10 Ubuntu 20.04

Have you figured out a way to resolve this?
because I am also getting the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants