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

bug: pip install .[recommended-plugins] causes dependency loops #893

Closed
sabotagebeats opened this issue Jul 20, 2022 · 3 comments
Closed
Labels
category: bug Something isn't working

Comments

@sabotagebeats
Copy link
Contributor

sabotagebeats commented Jul 20, 2022

Environment information

  • OS: wsl2 ubuntu 20.04

  • Python Version: 3.9.9

  • ape and plugin versions:
    ape 0.3.6.dev15+g8034d8ff
    Installed Plugins:
    fantom 0.3.0
    tokens 0.3.0
    ens 0.3.0
    vyper 0.3.0
    hardhat 0.3.0
    alchemy 0.3.0
    infura 0.3.0
    etherscan 0.3.1.dev0+g27b52bb.d20220620
    solidity 0.3.0

  • Contents of your ape-config.yaml (NOTE: do not post anything private like RPC urls or secrets!): n/a

What went wrong?

Please include information like:

  • what command you ran:
    pip install .[recommended-plugins]
  • the code that caused the failure: not sure
  • full output of the error you received
=> => # INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce => => # runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.

and in docker:

#11 124.5 ERROR: Cannot install eth-ape and eth-ape[recommended-plugins]==0.3.6.dev13+g5d1daf9f.d20220719 because these package versions have conflicting dependencies.
#11 124.5 The conflict is caused by:
#11 124.5     eth-ape[recommended-plugins] 0.3.6.dev13+g5d1daf9f.d20220719 depends on eth-ape 0.3.6.dev13+g5d1daf9f.d20220719 (from /code)
#11 124.5     ape-alchemy 0.2.0 depends on eth-ape<0.3.0 and >=0.2.1
#11 124.5     eth-ape[recommended-plugins] 0.3.6.dev13+g5d1daf9f.d20220719 depends on eth-ape 0.3.6.dev13+g5d1daf9f.d20220719 (from /code)
#11 124.5     ape-alchemy 0.1.1 depends on eth-ape<0.3.0 and >=0.2.1
#11 124.5     eth-ape[recommended-plugins] 0.3.6.dev13+g5d1daf9f.d20220719 depends on eth-ape 0.3.6.dev13+g5d1daf9f.d20220719 (from /code)
#11 124.5     ape-alchemy 0.1.0 depends on eth-ape<0.2.0 and >=0.1.0
#11 124.5 
#11 124.5 To fix this you could try to:
#11 124.5 1. loosen the range of package versions you've specified
#11 124.5 2. remove package versions to allow pip attempt to solve the dependency conflict
#11 124.5 
#11 124.5 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
------
executor failed running [/bin/sh -c pip install .[recommended-plugins]]: exit code: 1

How can it be fixed?

not sure but it works fine if we do the following:
ape plugins install

@sabotagebeats sabotagebeats added the category: bug Something isn't working label Jul 20, 2022
@sabotagebeats sabotagebeats self-assigned this Jul 20, 2022
@sabotagebeats
Copy link
Contributor Author

related: #891

@sabotagebeats sabotagebeats changed the title bug: `pip install .[recommended-plugins] causes dependency loops bug: pip install .[recommended-plugins] causes dependency loops Jul 20, 2022
@antazoey
Copy link
Member

did you try this:

    "recommended-plugins": [
        "ape-alchemy>=0.3",  # Alchemy public network provider
        "ape-ens>=0.3",  # ENS converter
        "ape-etherscan>=0.3",  # Etherscan explorer plugin
        "ape-foundry>=0.3",  # Foundry local and fork network EVM provider
        "ape-hardhat>=0.3",  # Hardhat local and fork network EVM provider
        "ape-infura>=0.3",  # Infura public network provider
        "ape-ledger>=0.3",  # Ledger Nano S/X hardware wallet
        "ape-solidity>=0.3",  # Solidity compiler support
        "ape-template>=0.3",  # Cookiecutter template support
        "ape-tokens>=0.3",  # Tokenlists converter
        "ape-trezor>=0.3",  # Trezor Model T/One hardware wallet
        "ape-vyper>=0.3",  # Vyper compiler support
    ],

(specifying the version to be the same minor as eth-ape minimally)

@antazoey
Copy link
Member

I just tried pip install eth-ape'[recommended-plugins]' in a fresh environment and it worked!

I believe the culprit lies in the fact that ape-foundry was broken regarding its dependency constraints previously and is now fixed. If one of plugins in the recommended-plugins set is broken in such as way, pip will attempt to find a solution by brute forcing things (and always failing).

Please re-opened if you still experience this issue. However, I believe we can close this now that ape-foundry is installable again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants