DavHau / mach-nix

Create highly reproducible python environments
MIT License
863 stars 106 forks source link

resolvelib.resolvers.ResolutionTooDeep: 1000 - while evaluating the attribute 'overrides' #73

Closed InLaw closed 3 years ago

InLaw commented 4 years ago

.nix:

 let
   mach-nix = import (builtins.fetchGit {
     url = "https://github.com/DavHau/mach-nix/";
     ref = "dev";
     rev = "371c0ebf7d6629c6893bc140be541452b2bd3129";
   });

   overlays = []; # some very useful overlays
  pkgs = import <nixpkgs> { config = { allowUnfree = true; }; inherit overlays; };
in mach-nix.mkPythonShell rec {

  python = pkgs.python38;

  #requirements = builtins.readFile ./requirements_open.txt;
  requirements =
  ''
  affine
  appdirs
  #appnope
  arcgis
  area
  argon2-cffi
  #atomicwrites
  attrs
  autoflake
  backcall
  beautifulsoup4
  black
  bleach
  bokeh
  certifi
  cffi
  chardet
  click
  click-plugins
  cligj
  #colorama
  colorcet
  cryptography
  cycler
  dask
  datashader
  datashape
  decorator
  defusedxml
  descartes
  entrypoints
  feather-format
  fiona
  flake8
  flufl.enum
  geoalchemy2
  geofeather
  geographiclib
  geojson
  geojsonio
  geolinks
  geopandas
  geopy
  github3.py
  googledrivedownloader
  greedy
  idna
  imageio
  importlib-metadata
  ipykernel
  ipython
  ipython-genutils
  ipywidgets
  jedi
  jeepney
  jinja2
  joblib
  json5
  jsonschema
  jupyter-client
  jupyter-core
  jupyterlab
  jupyterlab-server
  jwcrypto
  keyring
  kiwisolver
  lerc
  libpysal
  lidar
  llvmlite
  lxml
  markupsafe
  matplotlib
  mccabe
  mercantile
  missingno
  mistune
  momepy
  more-itertools
  multipledispatch
  munch
  mypy
  mypy-extensions
  nbconvert
  nbformat
  networkx
  notebook
  ntlm-auth
  numba
  numpy
  oauthlib
  osm-diff-tool
  osmapi
  #osmnet
  osmpythontools
  overpass
  overpy2
  owslib
  packaging
  pandas
  pandocfilters
  param
  parso
  pathlib
  pathspec
  pexpect
  pickleshare
  pillow
  pluggy
  pooch
  prometheus-client
  prompt-toolkit
  ptyprocess
  py
  pyarrow
  pycodestyle
  #pycparser
  pycsw
  pyct
  pydal
  pyflakes
  pygeos
  pygis
  pygments
  #pykerberos
  pyparsing
  pyproj
  pyrsistent
  pyshp
  pysimplegui
  pytest
  python-dateutil
  pytz
  pywavelets
  #pywin32
  #pywin32-ctypes
  #pywinpty
  pywps
  pyyaml
  pyzmq
  rasterio
  rasterstats
  regex
  requests
  #requests-kerberos
  requests-ntlm
  requests-oauthlib
  requests-toolbelt
  richdem
  rio-cogeo
  rsgis
  scikit-image
  scikit-learn
  scipy
  seaborn
  secretstorage
  send2trash
  shapely
  simplejson
  six
  snuggs
  soupsieve
  spatial
  sqlalchemy
  supermercado
  terminado
  testpath
  threadpoolctl
  tifffile
  toml
  toolz
  tornado
  tqdm
  traitlets
  typed-ast
  typing-extensions
  ujson
  uritemplate
  urllib3
  verde
  wcwidth
  webencodings
  werkzeug
  widgetsnbextension
  #winkerberos
  xarray
  xarray-spatial
  xmltodict
  zipp
  '';
}

error (due to xarray-spatial ):

building '/nix/store/q6ggvmdz3xhxb17afscz1l517aq8lba6-mach_nix_file.drv'...
Traceback (most recent call last):
Traceback (most recent call last):
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/generate.py", line 94, in <module>
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/generate.py", line 94, in <module>
    main()
    main()
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/generate.py", line 63, in main
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/generate.py", line 63, in main
    expr = generator.generate(reqs)
    expr = generator.generate(reqs)
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/generators/overides_generator.py", line 34, in generate
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/generators/overides_generator.py", line 34, in generate
    pkgs = self.resolver.resolve(reqs)
    pkgs = self.resolver.resolve(reqs)
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/resolver/resolvelib_resolver.py", line 63, in resolve
  File "/nix/store/4hxsjnydca2cbb0rrcm7n23bqigm6x69-00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/mach_nix/resolver/resolvelib_resolver.py", line 63, in resolve
    result = resolvelib.Resolver(Provider(self.nixpkgs, self.deps_provider), reporter).resolve(reqs, max_rounds=1000)
    result = resolvelib.Resolver(Provider(self.nixpkgs, self.deps_provider), reporter).resolve(reqs, max_rounds=1000)
  File "/nix/store/njdwizism6z27b18dcngxlm4pw9aa07f-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 413, in resolve
  File "/nix/store/njdwizism6z27b18dcngxlm4pw9aa07f-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 413, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/nix/store/njdwizism6z27b18dcngxlm4pw9aa07f-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 323, in resolve
  File "/nix/store/njdwizism6z27b18dcngxlm4pw9aa07f-python3-3.7.8-env/lib/python3.7/site-packages/resolvelib/resolvers.py", line 323, in resolve
    raise ResolutionTooDeep(max_rounds)
    raise ResolutionTooDeep(max_rounds)
resolvelib.resolvers.ResolutionTooDeep: 1000
resolvelib.resolvers.ResolutionTooDeep: 1000
builder for '/nix/store/q6ggvmdz3xhxb17afscz1l517aq8lba6-mach_nix_file.drv' failed with exit code 1
while evaluating the attribute 'nativeBuildInputs' of the derivation 'interactive-python3-3.8.3-environment' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/development/interpreters/python/wrapper.nix:54:9:
while evaluating the attribute 'passAsFile' of the derivation 'python3-3.8.3-env' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'callPackageWith' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/customisation.nix:117:35, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/development/interpreters/python/default.nix:20:24:
while evaluating 'makeOverridable' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/customisation.nix:67:24, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/customisation.nix:121:8:
while evaluating anonymous function at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/top-level/python-packages.nix:9:1, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/customisation.nix:69:16:
while evaluating 'fix'' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/fixed-points.nix:25:10, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/top-level/python-packages.nix:7040:4:
while evaluating 'extends' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/fixed-points.nix:69:24, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/fixed-points.nix:25:21:
while evaluating 'composeExtensions' at /nix/store/pz3w468p7ig3zj8fy5xsbrjn95dwiiwj-nixpkgs/lib/fixed-points.nix:75:17, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/fixed-points.nix:69:67:
while evaluating the attribute 'overrides' at /nix/store/00hpckqjf9zpy9xxxfs3hbac1rcw433m-source/default.nix:37:7:

error without xarray-spatial and avro:

while evaluating the attribute 'nativeBuildInputs' of the derivation 'interactive-python3-3.7.6-environment' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/development/interpreters/python/wrapper.nix:54:9:
while evaluating the attribute 'passAsFile' of the derivation 'python3-3.7.6-env' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'requiredPythonModules' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/top-level/python-packages.nix:64:27, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/development/interpreters/python/wrapper.nix:15:13:
while evaluating 'unique' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/lists.nix:643:12, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/top-level/python-packages.nix:66:6:
while evaluating 'requiredPythonModules' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/top-level/python-packages.nix:64:27, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/top-level/python-packages.nix:82:33:
while evaluating 'unique' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/lists.nix:643:12, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/top-level/python-packages.nix:66:6:
while evaluating 'unique' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/lists.nix:643:12, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/lists.nix:649:17:
while evaluating anonymous function at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/lists.nix:152:16, called from undefined position:
while evaluating the attribute 'out.outPath' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/customisation.nix:151:13:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'python3.7-lerc-0.1' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix:105:3:
while evaluating 'chooseDevOutputs' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/attrsets.nix:474:22, called from undefined position:
while evaluating 'optionals' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/lists.nix:270:5, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix:115:8:
while evaluating 'hasSuffix' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/lib/strings.nix:212:5, called from /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/development/interpreters/python/mk-python-derivation.nix:115:23:
while evaluating the attribute 'src.name' at /nix/store/dzk0krx7hylcm14wcbhpmqw7pi0z6ll3-nixpkgs-20.03.2652.076c67fdea6/nixpkgs/pkgs/build-support/fetchurl/default.nix:119:3:
while evaluating the attribute 'lerc."0.1"' at undefined position:

error: --- EvalError ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-shell
in file: /nix/store/7gcq8cb05544ra4dj08i4ys8cx9w6idl-nix-pypi-fetcher/default.nix (13:17)

attribute '0.1' missing
DavHau commented 4 years ago

May I ask which application requires an environment of this size? And does it build with other tools than mach-nix?

InLaw commented 4 years ago

An Data Science environment has this size and larger (depending on the actual project). The resulting application will have less dependencies but first there will be the development phase.

arijoon commented 2 years ago

How was this issue resolved? is it possible to override the 1000 max depth?

InLaw commented 2 years ago

no, as I understood, it a issue due to the resolver used. But I have not time to update/change it via a PR .. and mach-nix is only using the lib ..