ApeWorX / ape

The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
https://apeworx.io
Apache License 2.0
889 stars 131 forks source link

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

Closed sabotagebeats closed 2 years ago

sabotagebeats commented 2 years ago

Environment information

What went wrong?

Please include information like:

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 commented 2 years ago

related: https://github.com/ApeWorX/ape/pull/891

antazoey commented 2 years ago

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 commented 2 years ago

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.