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

WIP: pythonPackages.virtualenv: 16.7.9 -> 20.0.21 fix #66366 #88613

Closed
wants to merge 8 commits into from

Conversation

calbrecht
Copy link
Member

@calbrecht calbrecht commented May 22, 2020

Motivation for this change

fixes #66366 in that the newer version no longer checks if sys.prefix matches the virtualenv.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

before:
python2.7-virtualenv-16.7.9 102.6M
python3.7-virtualenv-16.7.9 104.9M
after:
python2.7-virtualenv-20.0.21 107.1M
python3.7-virtualenv-20.0.21 108.2M

@calbrecht
Copy link
Member Author

Still running nix-shell -p nixpkgs-review --run "nixpkgs-review wip"

@FRidh
Copy link
Member

FRidh commented May 22, 2020

@GrahamcOfBorg build pythonPackages.virtualenv python3Packages.virtualenv python38Packages.virtualenv

@calbrecht
Copy link
Member Author

calbrecht commented May 22, 2020

nix-shell -p nixpkgs-review --run "nixpkgs-review wip" finished with

[1/390/410 built (40 failed), 2937 copied (15523.6/15535.1 MiB), 3535.2 MiB DL]

semi-autogenerated list with hydra links to check for failling packages
full output of nixpkgs-review
tutnix ~/ws/nixpkgs (git) d72746969d5b U virtualenv-fix-66366
% nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0
$ git worktree add /home/alab/.cache/nixpkgs-review/rev-d72746969d5b2a1350e6840cf14239f5043bfe07-dirty-1/nixpkgs 086be4a7b83ff073504e05c93c24cbb9e23cab2e
Preparing worktree (detached HEAD 086be4a7b83)
Updating files: 100% (21748/21748), done.
HEAD is now at 086be4a7b83 Merge pull request #88543 from r-ryantm/auto-update/hopper
$ nix-env -f /home/alab/.cache/nixpkgs-review/rev-d72746969d5b2a1350e6840cf14239f5043bfe07-dirty-1/nixpkgs -qaP --xml --out-path --show-trace
Applying `nixpkgs` diff...
$ nix-env -f /home/alab/.cache/nixpkgs-review/rev-d72746969d5b2a1350e6840cf14239f5043bfe07-dirty-1/nixpkgs -qaP --xml --out-path --show-trace --meta
430 packages updated:
ansible ansible ansible ansible ansible-lint apache-airflow ape azure-cli bareos brotab buildbot buildsrht buku buttersink caffe caffe ceph ceph ceph-client circus cq-editor cura datadog-agent datasette dd-agent dispatchsrht electron-cash electrum FlexGet git-revise gitsrht glances google-music-scripts hgsrht http-prompt httpie hydra-check i3pystatus-unstable ib-controller kargo lexicon listssrht mansrht matrix-synapse metasrht mnemosyne mozlz4a mtprotoproxy mypy nagstamon neovim-remote nix-pin ntfy OctoPrint offlineimap pantsbuild.pants papis pastesrht patroni persepolis phwmon printrun psrecord pulseaudio-dlna-unstable pwndbg python2.7-ansible python2.7-billiard python2.7-celery python2.7-CNVkit python2.7-exchangelib python2.7-Flask-Caching python2.7-flower python2.7-fs python2.7-fs-s3fs python2.7-graphite-api python2.7-hdbscan python2.7-helpdev python2.7-imageio python2.7-influxgraph python2.7-joblib python2.7-junos-eznc python2.7-le python2.7-memory_profiler python2.7-ncclient python2.7-pomegranate python2.7-psutil python2.7-pwntools python2.7-pynisher python2.7-PyPrind python2.7-pytest-ansible python2.7-pytest-astropy python2.7-pytest-openfiles python2.7-pytest-server-fixtures python2.7-pytest-services python2.7-pytest-xprocess python2.7-python-lz4 python2.7-python-lz4 python2.7-pythonnet python2.7-qdarkstyle python2.7-ramlfications python2.7-rfc6555 python2.7-sacremoses python2.7-selectors2 python2.7-spyder-kernels python2.7-transformers python2.7-uproot python2.7-wurlitzer python2.7-xapp python3.7-aiorun python3.7-algebraic-data-types python3.7-ansible python3.7-ansible-kernel python3.7-ansible-lint python3.7-ansible-runner python3.7-apache-airflow python3.7-aplpy python3.7-asdf python3.7-asyncpg python3.7-baselines python3.7-batchgenerators python3.7-bayesian-optimization python3.7-billiard python3.7-blaze python3.7-buildbot python3.7-buildbot python3.7-buildbot python3.7-celery python3.7-cherrypy python3.7-CNVkit python3.7-dask-glm python3.7-dask-image python3.7-dask-jobqueue python3.7-dask-ml python3.7-dask-mpi python3.7-dask-xgboost python3.7-databases python3.7-datasette python3.7-datashader python3.7-dftfit python3.7-distributed python3.7-django-raster python3.7-djmail python3.7-entrance python3.7-entrance python3.7-exchangelib python3.7-fastapi python3.7-fastparquet python3.7-Flask-Caching python3.7-Flask-Common python3.7-flower python3.7-fs python3.7-fs-s3fs python3.7-git-revise python3.7-glymur python3.7-gns3-gui python3.7-gns3-server python3.7-google-music python3.7-graphite-api python3.7-graspy python3.7-habanero python3.7-handout python3.7-hdbscan python3.7-helpdev python3.7-heudiconv python3.7-hmmlearn python3.7-httpbin python3.7-httpx python3.7-hydra-check python3.7-ics python3.7-ignite python3.7-image-match python3.7-imagecorruptions python3.7-imageio python3.7-imbalanced-learn python3.7-imgaug python3.7-influxgraph python3.7-joblib python3.7-junos-eznc python3.7-kmapper python3.7-knack python3.7-librosa python3.7-lightgbm python3.7-mask-rcnn python3.7-memory_profiler python3.7-mlrose python3.7-moviepy python3.7-mypy python3.7-ncclient python3.7-nilearn python3.7-nipype python3.7-nvchecker python3.7-optuna python3.7-orm python3.7-osmnx python3.7-papis python3.7-persim python3.7-PIMS python3.7-pomegranate python3.7-powerline python3.7-pproxy python3.7-psutil python3.7-pwntools python3.7-pyalgotrade python3.7-pygbm python3.7-pyls-mypy python3.7-pymc3 python3.7-pynamodb python3.7-pynisher python3.7-PyPrind python3.7-pyregion python3.7-pytest-ansible python3.7-pytest-astropy python3.7-pytest-httpbin python3.7-pytest-mypy python3.7-pytest-openfiles python3.7-pytest-server-fixtures python3.7-pytest-services python3.7-pytest-xprocess python3.7-python-lz4 python3.7-python3.7-buildbot python3.7-python3.7-buildbot python3.7-pythonnet python3.7-qasm2image python3.7-qdarkstyle python3.7-qiskit python3.7-qiskit-aer python3.7-qiskit-aqua python3.7-qiskit-ibmq-provider python3.7-qiskit-ignis python3.7-qiskit-terra python3.7-radio_beam python3.7-ramlfications python3.7-reproject python3.7-rfc6555 python3.7-ripser python3.7-rl-coach python3.7-s-tui python3.7-sacremoses python3.7-sanic python3.7-Sanic-Auth python3.7-scikit-bio python3.7-scikit-image python3.7-scikit-learn python3.7-scikit-optimize python3.7-scikit-tda python3.7-selectors2 python3.7-sentry-sdk python3.7-sklearn-deap python3.7-spectral-cube python3.7-spyder python3.7-spyder python3.7-starlette python3.7-streamz python3.7-stumpy python3.7-stytra python3.7-sunpy python3.7-TatSu python3.7-textacy python3.7-tiledb python3.7-transformers python3.7-ueberzug python3.7-umap-learn python3.7-uproot python3.7-uvicorn python3.7-uvloop python3.7-vcrpy python3.7-vowpalwabbit python3.7-word2vec python3.7-ws4py python3.7-xapp python3.7-xgboost python3.7-zerobin python3.8-aiorun python3.8-algebraic-data-types python3.8-ansible python3.8-ansible-kernel python3.8-ansible-lint python3.8-ansible-runner python3.8-apache-airflow python3.8-aplpy python3.8-asdf python3.8-asyncpg python3.8-batchgenerators python3.8-bayesian-optimization python3.8-billiard python3.8-blaze python3.8-buildbot python3.8-celery python3.8-CNVkit python3.8-dask-glm python3.8-dask-image python3.8-dask-jobqueue python3.8-dask-ml python3.8-dask-mpi python3.8-dask-xgboost python3.8-databases python3.8-datashader python3.8-dftfit python3.8-distributed python3.8-django-raster python3.8-djmail python3.8-exchangelib python3.8-fastapi python3.8-fastparquet python3.8-Flask-Caching python3.8-Flask-Common python3.8-flower python3.8-fs python3.8-fs-s3fs python3.8-glymur python3.8-google-music python3.8-graphite-api python3.8-graspy python3.8-habanero python3.8-handout python3.8-hdbscan python3.8-helpdev python3.8-hmmlearn python3.8-httpbin python3.8-httpx python3.8-hydra-check python3.8-ignite python3.8-image-match python3.8-imagecorruptions python3.8-imageio python3.8-imbalanced-learn python3.8-imgaug python3.8-influxgraph python3.8-joblib python3.8-junos-eznc python3.8-kmapper python3.8-knack python3.8-librosa python3.8-lightgbm python3.8-memory_profiler python3.8-mlrose python3.8-moviepy python3.8-mypy python3.8-ncclient python3.8-nilearn python3.8-nipype python3.8-nvchecker python3.8-orm python3.8-osmnx python3.8-papis python3.8-persim python3.8-PIMS python3.8-pomegranate python3.8-powerline python3.8-pproxy python3.8-psutil python3.8-pwntools python3.8-pygbm python3.8-pynamodb python3.8-pynisher python3.8-PyPrind python3.8-pyregion python3.8-pytest-ansible python3.8-pytest-astropy python3.8-pytest-httpbin python3.8-pytest-mypy python3.8-pytest-openfiles python3.8-pytest-server-fixtures python3.8-pytest-services python3.8-pytest-xprocess python3.8-python-lz4 python3.8-python3.8-buildbot python3.8-python3.8-buildbot python3.8-pythonnet python3.8-qdarkstyle python3.8-qiskit-aer python3.8-qiskit-aqua python3.8-qiskit-ignis python3.8-qiskit-terra python3.8-radio_beam python3.8-ramlfications python3.8-reproject python3.8-rfc6555 python3.8-ripser python3.8-sacremoses python3.8-scikit-bio python3.8-scikit-image python3.8-scikit-learn python3.8-scikit-optimize python3.8-scikit-tda python3.8-selectors2 python3.8-sklearn-deap python3.8-spectral-cube python3.8-starlette python3.8-streamz python3.8-stytra python3.8-TatSu python3.8-textacy python3.8-tiledb python3.8-transformers python3.8-ueberzug python3.8-umap-learn python3.8-uproot python3.8-uvicorn python3.8-uvloop python3.8-vcrpy python3.8-vowpalwabbit python3.8-word2vec python3.8-xapp python3.8-xgboost quast rapid-photo-downloader run-scaled-git safeeyes sage sage sage samba snakemake spyder steamcontroller tartube tebreak terminator thefuck thonny todosrht tribler ueberzug ulauncher urh vorta xpra xpra zfs-replicate

$ nix build --no-link --keep-going --option build-use-sandbox relaxed -f /home/alab/.cache/nixpkgs-review/rev-d72746969d5b2a1350e6840cf14239f5043bfe07-dirty-1/build.nix
warning: ignoring the user-specified setting 'sandbox', because it is a restricted setting and you are not a trusted user
builder for '/nix/store/149bb40wssq6mfgcmxv524s2hkz370d9-mxnet-1.6.0.drv' failed with exit code 1; last 10 log lines:
  -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
  CMake Error at cmake/Modules/FindOpenBLAS.cmake:82 (MESSAGE):
    Could not find OpenBLAS
  Call Stack (most recent call first):
    cmake/ChooseBlas.cmake:42 (find_package)
    CMakeLists.txt:310 (include)


  -- Configuring incomplete, errors occurred!
  See also "/build/apache-mxnet-src-1.6.0-incubating/build/CMakeFiles/CMakeOutput.log".
cannot build derivation '/nix/store/5ygrgqy96hyzviqdxd4hvivvn1nbfg9n-python3.7-mxnet-1.6.0.drv': 1 dependencies couldn't be built
builder for '/nix/store/1wqy7d0h949mfldamb8c6x1l2sdhf765-python2.7-structlog-19.2.0.drv' failed with exit code 2; last 10 log lines:
  /nix/store/hr23lqkcb4kvkyj91gwlqjy2rpqp0zgk-python2.7-Twisted-20.3.0/lib/python2.7/site-packages/twisted/python/log.py:17
  /nix/store/hr23lqkcb4kvkyj91gwlqjy2rpqp0zgk-python2.7-Twisted-20.3.0/lib/python2.7/site-packages/twisted/python/log.py:17
    /nix/store/hr23lqkcb4kvkyj91gwlqjy2rpqp0zgk-python2.7-Twisted-20.3.0/lib/python2.7/site-packages/twisted/python/log.py:17: ImportWarning: Not importing directory '/nix/store/v1z9s35izss3bpfabk2976497hwgc8lf-python2.7-zope.event-4.4/lib/python2.7/site-packages/zope': missing __init__.py
      from zope.interface import Interface

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  =========================== short test summary info ============================
  FAILED tests/test_twisted.py
  !!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
  ===================== 4 warnings, 1 error in 2.04 seconds ======================
builder for '/nix/store/x7cbg358jmrb5srdfbamm5pngl60nzlk-python2.7-zc.lockfile-2.0.drv' failed with exit code 1; last 10 log lines:
      self.parseArgs(argv)
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/unittest/main.py", line 149, in parseArgs
      self.createTests()
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/unittest/main.py", line 158, in createTests
      self.module)
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
      suites = [self.loadTestsFromName(name, module) for name in names]
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
      parent, obj = obj, getattr(obj, part)
  AttributeError: 'module' object has no attribute 'tests'
cannot build derivation '/nix/store/4q7n73h339fina63lppjqrjigiac8lv0-python2.7-pytest-services-2.0.1.drv': 1 dependencies couldn't be built
builder for '/nix/store/5m2rax0pcyngp3r7i0jgx9jghxzh0hpj-ntfy-2.7.0.drv' failed with exit code 1; last 10 log lines:
      self.module)
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
      suites = [self.loadTestsFromName(name, module) for name in names]
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName
      return self.loadTestsFromModule(obj)
    File "/nix/store/4k6mfzmkcda54xlwqsj2v9432iif6ryb-python2.7-setuptools-44.0.0/lib/python2.7/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
      tests.append(self.loadTestsFromName(submodule))
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
      parent, obj = obj, getattr(obj, part)
  AttributeError: 'module' object has no attribute 'test_cli'
builder for '/nix/store/2v3948f71v9vcqfvy9p5cnm5c63ny1vh-python3.7-odo-unstable-2018-09-21.drv' failed with exit code 2; last 10 log lines:
    /nix/store/3qxh56b3nrlyxqdgsp57iyci1qp4z8a0-python3.7-multipledispatch-0.6.0/lib/python3.7/site-packages/multipledispatch/dispatcher.py:46: DeprecationWarning: restart_ordering is deprecated, if you would like to eagerly orderthe dispatchers, you should call the ``reorder()`` method on each dispatcher.
      DeprecationWarning,

  odo/backends/tests/test_bokeh.py:7
    /build/source/odo/backends/tests/test_bokeh.py:7: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
      import pandas.util.testing as tm

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
  =========== 12 skipped, 7 deselected, 26 warnings, 1 error in 8.66s ============
builder for '/nix/store/4a9fbq27xy4qy8pybvhikpz5pbh5amfl-pantsbuild.pants-1.7.0.drv' failed with exit code 1; last 10 log lines:
  DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  Processing ./pantsbuild.pants-1.7.0-py2-none-any.whl
  Requirement already satisfied: ansicolors in /nix/store/2c4rhkk7l7l6r3lfwpr6d9zblpy7y3fz-python2.7-ansicolors-1.1.8/lib/python2.7/site-packages (from pantsbuild.pants==1.7.0) (1.1.8)
  Requirement already satisfied: pyopenssl in /nix/store/cc40baqcj76vh2asrwz0b24vrp0j9lwv-python2.7-pyOpenSSL-19.1.0/lib/python2.7/site-packages (from pantsbuild.pants==1.7.0) (19.1.0)
  Requirement already satisfied: futures in /nix/store/arq6ng6jsz7b5yrj0v0i6s6lw4hzjrlf-python2.7-futures-3.3.0/lib/python2.7/site-packages (from pantsbuild.pants==1.7.0) (3.3.0)
  Requirement already satisfied: pystache in /nix/store/1kq17680lrpqp9hdgmi900h377mvdf5r-python2.7-pystache-0.5.4/lib/python2.7/site-packages (from pantsbuild.pants==1.7.0) (0.5.4)
  Requirement already satisfied: twitter.common.confluence in /nix/store/xq2bi65f1sp3j3kznmxhkjslrzn288fb-python2.7-twitter.common.confluence-0.3.11/lib/python2.7/site-packages (from pantsbuild.pants==1.7.0) (0.3.11)
  Requirement already satisfied: contextlib2 in /nix/store/ns5bjclp916v0php2mvjhwyfzydyx03g-python2.7-contextlib2-0.6.0.post1/lib/python2.7/site-packages (from pantsbuild.pants==1.7.0) (0.6.0.post1)
  ERROR: Could not find a version that satisfies the requirement requests[security]<2.22,>=2.5.0 (from pantsbuild.pants==1.7.0) (from versions: none)
  ERROR: No matching distribution found for requests[security]<2.22,>=2.5.0 (from pantsbuild.pants==1.7.0)
builder for '/nix/store/nx19c7x07v14nh2b84zsxb6ni90whwil-python2.7-exchangelib-1.12.2.drv' failed with exit code 1; last 10 log lines:
  Traceback (most recent call last):
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/threading.py", line 801, in __bootstrap_inner
      self.run()
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/threading.py", line 754, in run
      self.__target(*self.__args, **self.__kwargs)
    File "/nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/multiprocessing/pool.py", line 370, in _handle_tasks
      debug('task handler got sentinel')
  TypeError: 'NoneType' object is not callable
builder for '/nix/store/k0vb6h24rwsfxkkflk7qq12i0cd2rv9x-python2.7-Flask-Caching-1.8.0.drv' failed with exit code 1; last 10 log lines:
  flask_caching/backends/memcache.py       161    161     0%   1-318
  flask_caching/backends/null.py             5      5     0%   2-23
  flask_caching/backends/rediscache.py     117    117     0%   2-275
  flask_caching/backends/simple.py          54     54     0%   2-97
  flask_caching/backends/uwsgicache.py      31     31     0%   2-86
  flask_caching/jinja2ext.py                35     35     0%   2-103
  --------------------------------------------------------------------
  TOTAL                                    976    976     0%

  ======= 37 failed, 31 passed, 5 skipped, 115 deselected in 48.59 seconds =======
cannot build derivation '/nix/store/zzafpb4vy0ys6n9kir4na48h70c4qzsg-python2.7-graphite-api-1.1.3.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/krc09m99zjrik6d0f8s132jralpwsb34-python2.7-influxgraph-1.5.0.drv': 1 dependencies couldn't be built
builder for '/nix/store/gaf8y2dri4lifz8zzz4n3x5xpcg974p9-python2.7-junos-eznc-2.3.1.drv' failed with exit code 1; last 10 log lines:
  removing build/bdist.linux-x86_64/wheel
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/junos-eznc-2.3.1/dist /build/junos-eznc-2.3.1
  DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  Processing ./junos_eznc-2.3.1-py2-none-any.whl
  Requirement already satisfied: pyparsing in /nix/store/6adfps9cxx0v3m3s473dymmvk7ivl1is-python2.7-pyparsing-2.4.6/lib/python2.7/site-packages (from junos-eznc==2.3.1) (2.4.6)
  ERROR: Could not find a version that satisfies the requirement transitions (from junos-eznc==2.3.1) (from versions: none)
  ERROR: No matching distribution found for transitions (from junos-eznc==2.3.1)
cannot build derivation '/nix/store/m9kwpi7pij1nkwkfgp2zrnjhbv180yhj-python3.7-blaze-0.11.3.drv': 1 dependencies couldn't be built
builder for '/nix/store/cp7942xixs1gzrf4h576qcc9d0g3ivxa-python3.8-odo-unstable-2018-09-21.drv' failed with exit code 2; last 10 log lines:
    /nix/store/x2kvvl08yfy2g15gaisy90k55cyfiamx-python3.8-multipledispatch-0.6.0/lib/python3.8/site-packages/multipledispatch/dispatcher.py:42: DeprecationWarning: restart_ordering is deprecated, if you would like to eagerly orderthe dispatchers, you should call the ``reorder()`` method on each dispatcher.
      warn(

  odo/backends/tests/test_bokeh.py:7
    /build/source/odo/backends/tests/test_bokeh.py:7: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
      import pandas.util.testing as tm

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
  =========== 12 skipped, 7 deselected, 26 warnings, 1 error in 8.64s ============
builder for '/nix/store/7jbz561q499ddib9h879kanp2kxmipw4-python3.7-exchangelib-1.12.2.drv' failed with exit code 1; last 10 log lines:
  ?   ^ +++                  ^ +++                  ^ +++



  ----------------------------------------------------------------------
  Ran 405 tests in 0.309s

  FAILED (failures=2, skipped=351)
  Test failed: <unittest.runner.TextTestResult run=405 errors=0 failures=2>
  error: Test failed: <unittest.runner.TextTestResult run=405 errors=0 failures=2>
builder for '/nix/store/hx5pqihbrknx97m7129g6f7lwi2c1zaq-python3.7-dask-jobqueue-0.7.0.drv' failed with exit code 1; last 10 log lines:
  E            +    and   'http://localhost:8787/status' = LSFCluster('tcp://localhost:36535', workers=0, threads=0, memory=0 B).dashboard_link

  dask_jobqueue/tests/test_jobqueue_core.py:70: AssertionError
  =============================== warnings summary ===============================
  dask_jobqueue/tests/test_jobqueue_core.py::test_command_template
    /nix/store/fc091jbx8qjxmslk0f543k5q6dmgagq7-python3.7-tornado-5.1/lib/python3.7/site-packages/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
      class HTTPHeaders(collections.MutableMapping):

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  ============= 5 failed, 23 passed, 8 skipped, 1 warning in 28.67s ==============
builder for '/nix/store/gyhb7ksin7xnxbib8rify6ya1b15hibw-python3.7-qiskit-terra-0.14.1.drv' failed with exit code 1; last 10 log lines:
      ax1 = plt.subplots(figsize=(5, 5))[1]

  test/python/visualization/test_gate_map.py::TestGraphDist::test_dist_abs
  test/python/visualization/test_gate_map.py::TestGraphDist::test_dist_real
  test/python/visualization/test_gate_map.py::TestGraphDist::test_value
    /nix/store/smamwzbixsng7vda6pcmvnyafrh6g6is-python3.7-qiskit-terra-0.14.1/lib/python3.7/site-packages/test/python/visualization/test_gate_map.py:76: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
      ax2 = plt.subplots(figsize=(9, 3))[1]

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  ===== 1 failed, 4204 passed, 59 skipped, 587 warnings in 780.79s (0:13:00) =====
cannot build derivation '/nix/store/drmx469h97sg7xddhchz64xrs52n5l29-python3.7-qiskit-aer-0.5.1.drv': 1 dependencies couldn't be built
builder for '/nix/store/pr4aq0ycbdc470dxa6k4029swjz6miw0-python3.7-reproject-0.6.drv' failed with exit code 2; last 10 log lines:
      raise ConftestImportFailure(conftestpath, sys.exc_info())
  E   _pytest.config.ConftestImportFailure: (local('/build/reproject-0.6/build/lib.linux-x86_64-3.7/reproject/conftest.py'), (<class 'KeyError'>, KeyError('independent_celestial_slices'), <traceback object at 0x7fffe37827d0>))
  =============================== warnings summary ===============================
  /nix/store/r9gvmlsfci28p2jdjdswqchcsz93s23q-python3.7-astropy-4.0.1.post1/lib/python3.7/site-packages/astropy/config/configuration.py:557
    /nix/store/r9gvmlsfci28p2jdjdswqchcsz93s23q-python3.7-astropy-4.0.1.post1/lib/python3.7/site-packages/astropy/config/configuration.py:557: ConfigurationMissingWarning: Configuration defaults will be used due to FileNotFoundError:2 on None
      warn(ConfigurationMissingWarning(msg))

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
  ========================= 1 warning, 1 error in 1.45s ==========================
builder for '/nix/store/71nxj2fc0qlkyxyv082flbpgannvfbd5-python3.7-junos-eznc-2.3.1.drv' failed with exit code 1; last 10 log lines:
  adding 'junos_eznc-2.3.1.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/junos-eznc-2.3.1/dist /build/junos-eznc-2.3.1
  Processing ./junos_eznc-2.3.1-py3-none-any.whl
  Requirement already satisfied: paramiko>=1.15.2 in /nix/store/ghanxkv69h2s0cw3m5hhx7b0vfx3i7g0-python3.7-paramiko-2.7.1/lib/python3.7/site-packages (from junos-eznc==2.3.1) (2.7.1)
  ERROR: Could not find a version that satisfies the requirement transitions (from junos-eznc==2.3.1) (from versions: none)
  ERROR: No matching distribution found for transitions (from junos-eznc==2.3.1)
builder for '/nix/store/d4a4v5kdckj7p28fcm6xlhsfm2cfxlrb-python3.7-streamz-0.5.2.drv' failed with exit code 1; last 10 log lines:
    /nix/store/fc091jbx8qjxmslk0f543k5q6dmgagq7-python3.7-tornado-5.1/lib/python3.7/site-packages/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
      class HTTPHeaders(collections.MutableMapping):

  streamz/dataframe/tests/test_dataframes.py::test_windowing_n[<lambda>1-1-<lambda>4]
  streamz/dataframe/tests/test_dataframes.py::test_windowing_n[<lambda>1-1-<lambda>5]
    /build/streamz-0.5.2/streamz/dataframe/aggregations.py:98: RuntimeWarning: invalid value encountered in double_scalars
      result = result * n / (n - self.ddof)

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  = 809 failed, 735 passed, 5 skipped, 2 deselected, 80 xfailed, 56 xpassed, 8 warnings in 281.96s (0:04:41) =
builder for '/nix/store/29pw0glk99dkg473hw2f19jf7j4cljng-python3.7-stumpy-1.0.drv' failed with exit code 1; last 10 log lines:
      header = msgpack.loads(header, use_list=False, **msgpack_opts)
    File "msgpack/_unpacker.pyx", line 195, in msgpack._cmsgpack.unpackb
  ValueError: tuple is not allowed for map key
  =============================== warnings summary ===============================
  tests/test_mstumped.py::test_mstumped[T0-3]
    /nix/store/fc091jbx8qjxmslk0f543k5q6dmgagq7-python3.7-tornado-5.1/lib/python3.7/site-packages/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
      class HTTPHeaders(collections.MutableMapping):

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  ================== 12 failed, 47 passed, 1 warning in 41.92s ===================
cannot build derivation '/nix/store/dxs6fj010gfbmxiizgm16d5z5r8zhff9-python3.7-qiskit-ignis-0.3.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/sdfxvhmv8acsacm18l8w6y44097s1c4z-python3.7-qiskit-aqua-0.7.0.drv': 3 dependencies couldn't be built
builder for '/nix/store/9gmmf7b14jhk78adxc4km0lzmcw9igch-python3.7-imbalanced-learn-0.6.1.drv' failed with exit code 1; last 10 log lines:
  imblearn/tests/test_common.py::test_samplers[NearMiss-NearMiss-check_samplers_pandas]
    /build/imbalanced-learn-0.6.1/imblearn/under_sampling/_prototype_selection/_nearmiss.py:175: UserWarning: The number of the samples to be selected is larger than the number of samples available. The balancing ratio cannot be ensure and all samples will be returned.
      "The number of the samples to be selected is larger"

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  =========================== short test summary info ============================
  SKIPPED [2] /build/imbalanced-learn-0.6.1/imblearn/keras/tests/test_generator.py:8: could not import 'keras': No module named 'keras'
  SKIPPED [2] /nix/store/rnb2r0rx5zma1khfphf8kzbwzhszz16s-python3.7-pytest-5.3.5/lib/python3.7/site-packages/_pytest/unittest.py:237: Zenodo dataset can not be loaded.
  SKIPPED [1] /nix/store/rnb2r0rx5zma1khfphf8kzbwzhszz16s-python3.7-pytest-5.3.5/lib/python3.7/site-packages/_pytest/doctest.py:387: all tests skipped by +SKIP option
  = 4 failed, 513 passed, 5 skipped, 94 deselected, 11 warnings in 384.41s (0:06:24) =
builder for '/nix/store/m5s0wp4vyzy1b5rsdfm5zhw7vvymh1gz-python3.7-persim-0.1.2.drv' failed with exit code 1; last 10 log lines:
  test/test_distances.py::TestBottleneck::test_matching_to_self
    /nix/store/7hf2011wfk2aa19gv2qic41v3k6nkair-python3.7-persim-0.1.2/lib/python3.7/site-packages/persim/bottleneck.py:64: UserWarning: dgm2 has points with non-finite death times;ignoring those points
      "dgm2 has points with non-finite death times;"+

  test/test_persim.py::test_integer_diagrams
    /nix/store/7hf2011wfk2aa19gv2qic41v3k6nkair-python3.7-persim-0.1.2/lib/python3.7/site-packages/persim/images.py:87: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
      singular = not isinstance(diagrams[0][0], collections.Iterable)

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  =================== 5 failed, 36 passed, 3 warnings in 3.01s ===================
cannot build derivation '/nix/store/2r1axcm4x8nznf1bypvk9k398k1p6gf8-python3.7-ripser-0.4.1.drv': 1 dependencies couldn't be built
builder for '/nix/store/dqmpdg7h9p9xayx5n33yhdp9xhk7qg6r-python3.7-pygbm-0.1.0.drv' failed with exit code 1; last 10 log lines:
  E           cannot unpack non-iterable NoneType object

  /nix/store/nm7ffvv8ibrraz7hrb9iyyql576a2836-python3.7-numba-0.48.0/lib/python3.7/site-packages/numba/array_analysis.py:763: TypeError
  =============================== warnings summary ===============================
  /nix/store/mr3ibb3iln1lw26qwv8cq2slsa3w8icr-python3.7-scikit-learn-0.22.2.post1/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144
    /nix/store/mr3ibb3iln1lw26qwv8cq2slsa3w8icr-python3.7-scikit-learn-0.22.2.post1/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.utils.testing module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.utils. Anything that cannot be imported from sklearn.utils is now part of the private API.
      warnings.warn(message, FutureWarning)

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  = 28 failed, 72 passed, 4 skipped, 6 deselected, 1 warning in 161.36s (0:02:41) =
builder for '/nix/store/g5l5da5g3fix6ngns8mg2xwap66110ly-python3.7-OctoPrint-1.4.0.drv' failed with exit code 1; last 10 log lines:
  Requirement already satisfied: filetype<2,>=1.0.5 in /nix/store/9q47vw6qqk7snw4in0fggkvvsmiy084h-python3.7-filetype-1.0.7/lib/python3.7/site-packages (from OctoPrint==1.4.0) (1.0.7)
  Requirement already satisfied: werkzeug<0.17,>=0.16 in /nix/store/xi34msqkzvrpkh8af53waiq3zwpykrgb-python3.7-Werkzeug-0.16.1/lib/python3.7/site-packages (from OctoPrint==1.4.0) (0.16.1)
  Requirement already satisfied: pkginfo<1.6,>=1.5.0.1 in /nix/store/sq62v819v5ywx7h2jf1h3175i6bbxh3j-python3.7-pkginfo-1.5.0.1/lib/python3.7/site-packages (from OctoPrint==1.4.0) (1.5.0.1)
  Requirement already satisfied: requests<3,>=2.22.0 in /nix/store/50p35g12m1i1bfvbqcal3ajx5bwz8vfw-python3.7-requests-2.22.0/lib/python3.7/site-packages (from OctoPrint==1.4.0) (2.22.0)
  Requirement already satisfied: rsa<5,>=4.0 in /nix/store/5ms4y4ild5a8w82ah308iv9p4v52i9mv-python3.7-rsa-4.0/lib/python3.7/site-packages (from OctoPrint==1.4.0) (4.0)
  Requirement already satisfied: pyserial<3.5,>=3.4 in /nix/store/s9w5rbz255igs9l7728nphp124xddqvq-python3.7-pyserial-3.4/lib/python3.7/site-packages (from OctoPrint==1.4.0) (3.4)
  Requirement already satisfied: Jinja2<2.9,>=2.8.1 in /nix/store/gd2s8d3r0pwq4n45fcl4pvf2ppbjccs6-python3.7-Jinja2-2.8.1/lib/python3.7/site-packages (from OctoPrint==1.4.0) (2.8.1)
  Requirement already satisfied: netifaces<0.11,>=0.10.9 in /nix/store/vcd2r45d6hd44ydl99kyb2ail31ckdg4-python3.7-netifaces-0.10.9/lib/python3.7/site-packages (from OctoPrint==1.4.0) (0.10.9)
  ERROR: Could not find a version that satisfies the requirement watchdog<0.10,>=0.9.0 (from OctoPrint==1.4.0) (from versions: none)
  ERROR: No matching distribution found for watchdog<0.10,>=0.9.0 (from OctoPrint==1.4.0)
cannot build derivation '/nix/store/5vp6mp53wn4kpg6pmshs4cavnvnznf31-python3.7-scikit-tda-0.0.4.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/clpbsnavsfx14cc8zlj2k5jziac5bvbp-python3.7-qiskit-ibmq-provider-0.7.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/52brig4kmajgwdh4nkcc5l7qmmfks00x-python3.7-qiskit-0.19.1.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/dhbyja1w75dpzv4dp29pcgh7314v0zpg-python3.7-qasm2image-0.8.0.drv': 1 dependencies couldn't be built
builder for '/nix/store/8knbv5fdl07dyq2xk4xwy9lapcs5avm7-python3.7-papis-0.9.drv' failed with exit code 1; last 10 log lines:
  Requirement already satisfied: pygments>=2.2.0 in /nix/store/gdbgq36vlwhxva8am6hs0ikpicrf5ibz-python3.7-Pygments-2.5.2/lib/python3.7/site-packages (from papis==0.9) (2.5.2)
  Requirement already satisfied: requests>=2.11.1 in /nix/store/50p35g12m1i1bfvbqcal3ajx5bwz8vfw-python3.7-requests-2.22.0/lib/python3.7/site-packages (from papis==0.9) (2.22.0)
  Requirement already satisfied: stevedore>=1.30 in /nix/store/27avmf4gkgl48gz23sw4xmhvv37g8anj-python3.7-stevedore-1.31.0/lib/python3.7/site-packages (from papis==0.9) (1.31.0)
  Requirement already satisfied: isbnlib<4.0.0,>=3.9.1 in /nix/store/4vj036kylsjqr6gmbp61s3dhja68i8yr-python3.7-isbnlib-3.10.0/lib/python3.7/site-packages (from papis==0.9) (3.10.0)
  Requirement already satisfied: colorama>=0.2 in /nix/store/8ni7mhmi5390g5c7y2pklcpabdsf62ks-python3.7-colorama-0.4.3/lib/python3.7/site-packages (from papis==0.9) (0.4.3)
  Requirement already satisfied: python-slugify in /nix/store/2kymi00paiy2hnrkl6xqnpdy7pbh6s1m-python3.7-python-slugify-4.0.0/lib/python3.7/site-packages (from papis==0.9) (4.0.0)
  Requirement already satisfied: PyYAML>=3.12 in /nix/store/8lvh806xjg2jbwk645vp80z3z2vll4pa-python3.7-PyYAML-5.2/lib/python3.7/site-packages (from papis==0.9) (5.2)
  Requirement already satisfied: lxml~=4.3 in /nix/store/75w1dxys3dw3i65l14zr8md38n8z5i9p-python3.7-lxml-4.5.0/lib/python3.7/site-packages (from papis==0.9) (4.5.0)
  ERROR: Could not find a version that satisfies the requirement prompt-toolkit<3,>=2.0.5 (from papis==0.9) (from versions: none)
  ERROR: No matching distribution found for prompt-toolkit<3,>=2.0.5 (from papis==0.9)
builder for '/nix/store/3qdq0ymid32q9vipda4nxvkwa3y7hd1r-ape-2019-08-10.drv' failed with exit code 1; last 5 log lines:
  unpacking sources
  unpacking source archive /nix/store/3fng3asivgxwfiw0vjnsdg6rl3044ch4-source
  source root is source
  patching sources
  cp: -r not specified; omitting directory '/nix/store/a7kp4iqn3mz2i0ijhm3z1qz34ddsy7l9-lexicon-3.3.22'
cannot build derivation '/nix/store/v384z8h6qnyq5ha4g47kg7nimsff5hxb-python3.8-blaze-0.11.3.drv': 1 dependencies couldn't be built
builder for '/nix/store/nlbd58wldbjgmi3bgc5k4dsxk07ylq5p-python3.8-celery-4.4.2.drv' failed with exit code 1; last 10 log lines:

    Traceback (most recent call last):
      File "/nix/store/hfdmq48vi23d3fhakfcrzh7730850bv9-python3.8-celery-4.4.2/lib/python3.8/site-packages/celery/app/trace.py", line 362, in trace_task
        raise InvalidTaskError(
    celery.exceptions.InvalidTaskError: Task keyword arguments is not a mapping

      warn(RuntimeWarning(

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  = 1 failed, 2415 passed, 150 skipped, 5 deselected, 36 warnings in 98.25s (0:01:38) =
cannot build derivation '/nix/store/c1r2w841n2y5qi9pfca96nac1xc4fxvl-python3.8-django-raster-0.7.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/0ka949zf7zbkzckjibcldl8fra17myh3-python3.8-djmail-1.1.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/kb3312a0x5ylh8r6p195ck17i4xaj4nx-python3.8-flower-0.9.3.drv': 1 dependencies couldn't be built
builder for '/nix/store/frplyywryrw0gqkawq31vw5rfgasxbji-python3.8-dask-jobqueue-0.7.0.drv' failed with exit code 1; last 10 log lines:
  E            +    and   'http://localhost:8787/status' = LSFCluster('tcp://localhost:37971', workers=0, threads=0, memory=0 B).dashboard_link

  dask_jobqueue/tests/test_jobqueue_core.py:70: AssertionError
  =============================== warnings summary ===============================
  dask_jobqueue/tests/test_jobqueue_core.py::test_command_template
    /nix/store/ic8rc3p99cdr6zsyb8nxkmiggd9khx0r-python3.8-tornado-5.1/lib/python3.8/site-packages/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
      class HTTPHeaders(collections.MutableMapping):

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  ============= 5 failed, 23 passed, 8 skipped, 1 warning in 26.83s ==============
builder for '/nix/store/kyz14m3255dp8zh9djncfpbk6jlmb16c-python3.8-exchangelib-1.12.2.drv' failed with exit code 1; last 10 log lines:
  ?   ^ +++                  ^ +++                  ^ +++



  ----------------------------------------------------------------------
  Ran 405 tests in 0.248s

  FAILED (failures=2, skipped=351)
  Test failed: <unittest.runner.TextTestResult run=405 errors=0 failures=2>
  error: Test failed: <unittest.runner.TextTestResult run=405 errors=0 failures=2>
cannot build derivation '/nix/store/pp07f6q5i33azk4v4vsqi1s60j3mjgp6-python3.7-optuna-0.19.0.drv': 1 dependencies couldn't be built
builder for '/nix/store/z3qy04kzm1ygj8m7s9fmq57m61ksa3df-python3.8-apache-airflow-1.10.5.drv' failed with exit code 1; last 10 log lines:
  airflow.models.dagbag.DagBag: DEBUG: Importing /build/source/airflow/example_dags/tutorial.py
  airflow.models.dagbag.DagBag: DEBUG: Loaded DAG <DAG: tutorial>
  airflow.models.dagbag.DagBag: DEBUG: Importing /build/source/airflow/example_dags/subdags/subdag.py
  --------------------- >> end captured logging << ---------------------

  ----------------------------------------------------------------------
  Ran 56 tests in 25.279s

  FAILED (errors=3, failures=1)
  [2020-05-22 17:22:07,593] {settings.py:238} DEBUG - Disposing DB connection pool (PID 454)
builder for '/nix/store/c32w62wl0q4i36kl4x8bx5ibw617w49b-python3.8-reproject-0.6.drv' failed with exit code 2; last 10 log lines:
      raise ConftestImportFailure(conftestpath, sys.exc_info())
  E   _pytest.config.ConftestImportFailure: (local('/build/reproject-0.6/build/lib.linux-x86_64-3.8/reproject/conftest.py'), (<class 'KeyError'>, KeyError('independent_celestial_slices'), <traceback object at 0x7fffe3818a00>))
  =============================== warnings summary ===============================
  /nix/store/h2ajnc3x2w3l571nl36dgvisqwb0cr9m-python3.8-astropy-4.0.1.post1/lib/python3.8/site-packages/astropy/config/configuration.py:557
    /nix/store/h2ajnc3x2w3l571nl36dgvisqwb0cr9m-python3.8-astropy-4.0.1.post1/lib/python3.8/site-packages/astropy/config/configuration.py:557: ConfigurationMissingWarning: Configuration defaults will be used due to FileNotFoundError:2 on None
      warn(ConfigurationMissingWarning(msg))

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
  ========================= 1 warning, 1 error in 1.68s ==========================
cannot build derivation '/nix/store/dcmp4f82qnf6sl5mbbwhl3m82q2rrlgr-python3.8-aplpy-2.0.3.drv': 1 dependencies couldn't be built
builder for '/nix/store/0c69p8in559sdpyy01ic2gszkjimrkwk-caffe-1.0.drv' failed with exit code 1; last 10 log lines:
  CMake Error at cmake/Modules/FindOpenBLAS.cmake:55 (MESSAGE):
    Could not find OpenBLAS
  Call Stack (most recent call first):
    cmake/Dependencies.cmake:116 (find_package)
    CMakeLists.txt:46 (include)


  -- Configuring incomplete, errors occurred!
  See also "/build/source/build/CMakeFiles/CMakeOutput.log".
  See also "/build/source/build/CMakeFiles/CMakeError.log".
builder for '/nix/store/71qv5wnps2rfir78qrp0p4n2rxrx47p2-python3.8-datashader-0.9.0.drv' failed with exit code 1; last 10 log lines:
  datashader/tests/test_xarray.py::test_count[source3]
  datashader/tests/test_xarray.py::test_count[source3]
  datashader/tests/test_xarray.py::test_count[source3]
  datashader/tests/test_xarray.py::test_count[source3]
  datashader/tests/test_xarray.py::test_count[source3]
    /build/datashader-0.9.0/datashader/core.py:1002: PendingDeprecationWarning: dropping variables using `drop` will be deprecated; using drop_vars is encouraged.
      source = source.drop([col for col in columns if col not in cols_to_keep])

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  ==== 13 failed, 528 passed, 13 skipped, 1034 warnings in 408.68s (0:06:48) =====
builder for '/nix/store/hmyzfd1n2g2vgrzhmd7m9ck5vri0r80y-bareos-17.2.7.drv' failed with exit code 2; last 10 log lines:
    550 |       if (glfs_ftruncate(m_gfd, 0) != 0) {
        |                                  ^
  In file included from ../backends/gfapi_device.h:31,
                   from gfapi_device.c:34:
  /nix/store/x5kzyx1iwqs9pgirnck1lcx3pq838ckq-glusterfs-7.5/include/glusterfs/api/glfs.h:768:1: note: declared here
    768 | glfs_ftruncate(glfs_fd_t *fd, off_t length, struct glfs_stat *prestat,
        | ^~~~~~~~~~~~~~
  make[1]: *** [Makefile:217: gfapi_device.lo] Error 1
  make[1]: Leaving directory '/build/bareos-17.2.7-src/src/stored/backends'
  make: *** [GNUmakefile:167: src/stored/backends] Error 2
builder for '/nix/store/wif7frhqii6fbfddmf25ns8fx5d8nasd-python3.8-junos-eznc-2.3.1.drv' failed with exit code 1; last 10 log lines:
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/junos-eznc-2.3.1/dist /build/junos-eznc-2.3.1
  Processing ./junos_eznc-2.3.1-py3-none-any.whl
  Requirement already satisfied: lxml>=3.2.4 in /nix/store/dibmyw854vzwx5dac90x69kk2mcvyvz3-python3.8-lxml-4.5.0/lib/python3.8/site-packages (from junos-eznc==2.3.1) (4.5.0)
  Requirement already satisfied: scp>=0.7.0 in /nix/store/02lwmks3zcsyi6qsgxmhxi5infmghdaq-python3.8-scp-0.13.2/lib/python3.8/site-packages (from junos-eznc==2.3.1) (0.13.2)
  Requirement already satisfied: ncclient>=0.6.3 in /nix/store/sd9dr48gj6sym9vxh7lx5wfcz8gh0swg-python3.8-ncclient-0.6.7/lib/python3.8/site-packages (from junos-eznc==2.3.1) (0.6.7)
  ERROR: Could not find a version that satisfies the requirement transitions (from junos-eznc==2.3.1) (from versions: none)
  ERROR: No matching distribution found for transitions (from junos-eznc==2.3.1)
builder for '/nix/store/p45h6ac6dqcnxg2s7jbmakfw8xy4vavc-python3.8-persim-0.1.2.drv' failed with exit code 1; last 10 log lines:
  test/test_distances.py::TestBottleneck::test_matching_to_self
    /nix/store/92lj7vb6wn5c2r989szcakl6pjlz5zi2-python3.8-persim-0.1.2/lib/python3.8/site-packages/persim/bottleneck.py:63: UserWarning: dgm2 has points with non-finite death times;ignoring those points
      warnings.warn(

  test/test_persim.py::test_integer_diagrams
    /nix/store/92lj7vb6wn5c2r989szcakl6pjlz5zi2-python3.8-persim-0.1.2/lib/python3.8/site-packages/persim/images.py:87: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
      singular = not isinstance(diagrams[0][0], collections.Iterable)

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  =================== 5 failed, 36 passed, 3 warnings in 3.62s ===================
cannot build derivation '/nix/store/d66m26j3m9vp3aj2s5a63nx4cdpdbp2l-python3.8-ripser-0.4.1.drv': 1 dependencies couldn't be built
builder for '/nix/store/67nhzrmfyywnlskyisb5621hdwwz8ai3-python3.8-imbalanced-learn-0.6.1.drv' failed with exit code 1; last 10 log lines:
  imblearn/tests/test_common.py::test_samplers[NearMiss-NearMiss-check_samplers_pandas]
    /build/imbalanced-learn-0.6.1/imblearn/under_sampling/_prototype_selection/_nearmiss.py:174: UserWarning: The number of the samples to be selected is larger than the number of samples available. The balancing ratio cannot be ensure and all samples will be returned.
      warnings.warn(

  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  =========================== short test summary info ============================
  SKIPPED [2] /build/imbalanced-learn-0.6.1/imblearn/keras/tests/test_generator.py:8: could not import 'keras': No module named 'keras'
  SKIPPED [2] /nix/store/q5wyf15ymsq73ny992c3aiy5fh0qsbdl-python3.8-pytest-5.3.5/lib/python3.8/site-packages/_pytest/unittest.py:237: Zenodo dataset can not be loaded.
  SKIPPED [1] /nix/store/q5wyf15ymsq73ny992c3aiy5fh0qsbdl-python3.8-pytest-5.3.5/lib/python3.8/site-packages/_pytest/doctest.py:387: all tests skipped by +SKIP option
  = 4 failed, 513 passed, 5 skipped, 94 deselected, 11 warnings in 405.63s (0:06:45) =
builder for '/nix/store/cwnbksjxf64q3di4msaf826kl2mhi5b3-python3.8-pygbm-0.1.0.drv' failed with exit code 139; last 10 log lines:
    File "/nix/store/q5wyf15ymsq73ny992c3aiy5fh0qsbdl-python3.8-pytest-5.3.5/lib/python3.8/site-packages/_pytest/main.py", line 247 in _main
    File "/nix/store/q5wyf15ymsq73ny992c3aiy5fh0qsbdl-python3.8-pytest-5.3.5/lib/python3.8/site-packages/_pytest/main.py", line 197 in wrap_session
    File "/nix/store/q5wyf15ymsq73ny992c3aiy5fh0qsbdl-python3.8-pytest-5.3.5/lib/python3.8/site-packages/_pytest/main.py", line 240 in pytest_cmdline_main
    File "/nix/store/3fbi321bfvh1hyg5si7h1v38xj13gxy0-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
    File "/nix/store/3fbi321bfvh1hyg5si7h1v38xj13gxy0-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
    File "/nix/store/3fbi321bfvh1hyg5si7h1v38xj13gxy0-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
    File "/nix/store/3fbi321bfvh1hyg5si7h1v38xj13gxy0-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
    File "/nix/store/q5wyf15ymsq73ny992c3aiy5fh0qsbdl-python3.8-pytest-5.3.5/lib/python3.8/site-packages/_pytest/config/__init__.py", line 92 in main
    File "/nix/store/q5wyf15ymsq73ny992c3aiy5fh0qsbdl-python3.8-pytest-5.3.5/bin/.pytest-wrapped", line 9 in <module>
  /nix/store/ba8fhbmvfyh439606lni91y420yflmlc-stdenv-linux/setup: line 1301:    59 Segmentation fault      (core dumped) pytest -k "not test_derivatives"
builder for '/nix/store/dmhbbm2sryck36dykm1yg13hknsxddk5-python3.8-streamz-0.5.2.drv' failed with exit code 1; last 10 log lines:
    File "/nix/store/b1w4kd78z73nr4sf6vmrm4b7rw40w9jw-python3.8-distributed-2.9.1/lib/python3.8/site-packages/distributed/client.py", line 381, in __del__
    File "/nix/store/b1w4kd78z73nr4sf6vmrm4b7rw40w9jw-python3.8-distributed-2.9.1/lib/python3.8/site-packages/distributed/client.py", line 359, in release
    File "/nix/store/ic8rc3p99cdr6zsyb8nxkmiggd9khx0r-python3.8-tornado-5.1/lib/python3.8/site-packages/tornado/platform/asyncio.py", line 154, in add_callback
  AttributeError: 'NoneType' object has no attribute 'partial'
  Exception ignored in: <function Future.__del__ at 0x7ffff5a6cca0>
  Traceback (most recent call last):
    File "/nix/store/b1w4kd78z73nr4sf6vmrm4b7rw40w9jw-python3.8-distributed-2.9.1/lib/python3.8/site-packages/distributed/client.py", line 381, in __del__
    File "/nix/store/b1w4kd78z73nr4sf6vmrm4b7rw40w9jw-python3.8-distributed-2.9.1/lib/python3.8/site-packages/distributed/client.py", line 359, in release
    File "/nix/store/ic8rc3p99cdr6zsyb8nxkmiggd9khx0r-python3.8-tornado-5.1/lib/python3.8/site-packages/tornado/platform/asyncio.py", line 154, in add_callback
  AttributeError: 'NoneType' object has no attribute 'partial'
cannot build derivation '/nix/store/fksrimws78kina29yp0pjk8m044rdayd-python3.8-scikit-tda-0.0.4.drv': 2 dependencies couldn't be built
builder for '/nix/store/shm0242ca8d7h2ghapwxqsgfpl2z7gw2-python3.8-papis-0.9.drv' failed with exit code 1; last 10 log lines:
  /build/source/dist /build/source
  Processing ./papis-0.9-py3-none-any.whl
  Requirement already satisfied: pyparsing>=2.2.0 in /nix/store/l83yzcwssfj7hdwpllx8vsg50r4znm2w-python3.8-pyparsing-2.4.6/lib/python3.8/site-packages (from papis==0.9) (2.4.6)
  Requirement already satisfied: pygments>=2.2.0 in /nix/store/b6z6m4djkxjzn8685kqbpndh3k35za1z-python3.8-Pygments-2.5.2/lib/python3.8/site-packages (from papis==0.9) (2.5.2)
  Requirement already satisfied: lxml~=4.3 in /nix/store/dibmyw854vzwx5dac90x69kk2mcvyvz3-python3.8-lxml-4.5.0/lib/python3.8/site-packages (from papis==0.9) (4.5.0)
  Requirement already satisfied: click>=7.0.0 in /nix/store/iz86lpx39f961yra57y4iwgnh9finnsb-python3.8-click-7.1.1/lib/python3.8/site-packages (from papis==0.9) (7.1.1)
  Requirement already satisfied: isbnlib<4.0.0,>=3.9.1 in /nix/store/8nc833zs43gljlmcz2bp6cpij5clhczc-python3.8-isbnlib-3.10.0/lib/python3.8/site-packages (from papis==0.9) (3.10.0)
  Requirement already satisfied: habanero>=0.6.0 in /nix/store/hc99bfk1cb4hzjfwj77j3m7h03gb76ri-python3.8-habanero-0.6.0/lib/python3.8/site-packages (from papis==0.9) (0.6.0)
  ERROR: Could not find a version that satisfies the requirement prompt-toolkit<3,>=2.0.5 (from papis==0.9) (from versions: none)
  ERROR: No matching distribution found for prompt-toolkit<3,>=2.0.5 (from papis==0.9)
builder for '/nix/store/apnq9inikzj6pkmrd4rxwghx78sa3d9y-python3.8-pythonnet-2.4.0.drv' failed with exit code 1; last 10 log lines:
      self.build_extensions()
    File "/nix/store/081w0sp7jnh33548cihj3a9y9jpn9b3s-python3-3.8.2/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/nix/store/081w0sp7jnh33548cihj3a9y9jpn9b3s-python3-3.8.2/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "setup.py", line 298, in build_extension
      subprocess.check_call([sys.executable, geninterop, interop_file])
    File "/nix/store/081w0sp7jnh33548cihj3a9y9jpn9b3s-python3-3.8.2/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/nix/store/081w0sp7jnh33548cihj3a9y9jpn9b3s-python3-3.8.2/bin/python3.8', 'tools/geninterop/geninterop.py', 'src/runtime/interop38.cs']' returned non-zero exit status 1.
builder for '/nix/store/2wzln66lymxn39jqy9d5p70s26lwv58p-jdk-8u251-linux-x64.tar.gz.drv' failed with exit code 1; last 10 log lines:
  ***
  Unfortunately, we cannot download file jdk-8u251-linux-x64.tar.gz automatically.
  Please go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html to download it yourself, and add it to the Nix store
  using either
    nix-store --add-fixed sha256 jdk-8u251-linux-x64.tar.gz
  or
    nix-prefetch-url --type sha256 file:///path/to/jdk-8u251-linux-x64.tar.gz

  ***
cannot build derivation '/nix/store/m30rn41ya1di7sxddkyba89286ilafdf-oraclejdk-8u251.drv': 1 dependencies couldn't be built
builder for '/nix/store/wk7gqany5f75ni93s6p6k52cm2737sar-ibtws_9542.jar.drv' failed with exit code 1; last 10 log lines:

  ***
  This nix expression requires that ibtws_9542.jar is already part of the store.
  Download the TWS from
  https://download2.interactivebrokers.com/download/unixmacosx_latest.jar,
  rename the file to ibtws_9542.jar, and add it to the nix store with
  "nix-prefetch-url file://$PWD/ibtws_9542.jar".

  ***
cannot build derivation '/nix/store/lmlg6v3cvgcdj3ajsl7qbnazp3qamcm3-ib-tws-9542.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/q839jgfqsfqwywmiadkl1n4wha79xq8p-ib-controller-2.14.0.drv': 2 dependencies couldn't be built
[1/390/410 built (40 failed), 2937 copied (15523.6/15535.1 MiB), 3535.2 MiB DL]

(Might be, i messed up, because i had a dirty pythonPackages.psutil in the nixpkgs clone as well)

@calbrecht
Copy link
Member Author

hu? stdenv is missing when building for python2Packages.

@calbrecht calbrecht requested a review from FRidh May 23, 2020 08:18

patches = [ ./virtualenv-change-prefix.patch ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this patch no longer needed? if so, then the patch should also be removed from the tree.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Shame on me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, i am checking this right now if the comments within the patch still hold.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh my, it doesn't even apply. Beside that, i guess the comments are still true for python2.7 at least, somehow. The virtualenv command kind of succeeds when started with

nix-shell --pure -p 'python27.withPackages (ps: [ps.virtualenv])'

but still complains

[nix-shell:~/ws/test-66366]$ virtualenv --python python2.7 .venv
ValueError: source and destination is the same /nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/os.py

[nix-shell:~/ws/test-66366]$ python --version
Python 2.7.18

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, no. i am stupid. of course python2.7 is available in nix shell.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running non-interactively with a testsetup i found the second comment of the patch

A sitecustomize.py is created in the virtualenv which makes libraries
from the python specified by the --python argument available to the
virtualenv. For example, this makes readline and sqlite3 available
when a wrapped python is specified. If no --python argument is passed,
it will only add the path to the python used when building
virtualenv, which is the unwrapped python, so sqlite3 won't be
available.

no longer holds true.

at least this is what i get from running nix-shell --pure with

shell.nix
{ pkgs ? import <nixpkgs> {} }:

let
  pythons = [
    (pkgs.python37.withPackages (ps: [ps.virtualenv]))
    pkgs.python35
    pkgs.python36
    pkgs.python38
    pkgs.python39
    pkgs.python27
  ];
in pkgs.mkShell {

  nativeBuildInputs = pythons;

  shellHook = ''
    echo primary python is $(python --version)

    for p in python3.5 python3.6 python3.8 python3.9 python2.7 ; do
      virtualenv --python ''${p} --clear .venv
      source .venv/bin/activate
      python --version
      python -c 'import sqlite3' && deactivate &&  echo done
    done

    virtualenv --clear .venv
    source .venv/bin/activate
    python --version
    python -c 'import sqlite3' && deactivate &&  echo done

  '';
}
output
primary python is Python 3.7.7
created virtual environment CPython3.5.9.final.0-64 in 677ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.5.9
done
created virtual environment CPython3.6.10.final.0-64 in 861ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.6.10
done
created virtual environment CPython3.8.2.final.0-64 in 1044ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.8.2
done
created virtual environment CPython3.9.0.alpha.4-64 in 1204ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.9.0a4
done
created virtual environment CPython2.7.18.final.0-64 in 816ms
  creator CPython2Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator
Python 2.7.18
done
created virtual environment CPython3.7.7.final.0-64 in 257ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.7.7
done

the first comment of the patch

Without this patch virtualenv --python=python2.7 . fails with an
error because it notices that the python readline.so is not in the
same path as python2.7. I assume this is to avoid copying the wrong
file on systems where it is possible to find incompatible libraries by
accident. Adding "/nix/store" to the prefix fixes this problem.

still holds true, i will investigate how to overcome this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, ok changing shell.nix to use only pythons withPackages, after getting closer to understanding the issue (don't know if i fully grok this yet) is giving totally different results (as a side note, i am thankful for that :)) and indeed now the python27.withPackages is totally refusing to be locked into .venv.

shell.nix
{ pkgs ? import <nixpkgs> {} }:

let
  pythons = [
    (pkgs.python37.withPackages (ps: [ps.virtualenv ps.automat]))
    (pkgs.python27.withPackages (ps: [ps.automat]))
    (pkgs.python35.withPackages (ps: [ps.automat]))
    (pkgs.python36.withPackages (ps: [ps.automat]))
    (pkgs.python38.withPackages (ps: [ps.automat]))
    (pkgs.python39.withPackages (ps: [ps.automat]))
  ];
in pkgs.mkShell {

  nativeBuildInputs = pythons ++ [ pkgs.which ];

  shellHook = ''
    echo primary python is $(python --version)

    for p in python2.7 python3.5 python3.6 python3.7 python3.8 python3.9 ; do
      echo
      echo Testing ''${p}
      virtualenv --python ''${p} --clear .venv
      source .venv/bin/activate
      python --version
      echo -n "import sqlite3 "
      python -c 'import sqlite3' && echo succeeded || echo failed
      echo -n "import automat "
      python -c 'import automat' && echo succeeded || echo failed
      deactivate && echo done
    done

    echo
    echo Testing python3.7 without specifying interpreter to virtualenv
    virtualenv --clear .venv
    source .venv/bin/activate
    python --version
    echo -n "import sqlite3 "
    python -c 'import sqlite3' && echo succeeded || echo failed
    echo -n "import automat "
    python -c 'import automat' && echo succeeded || echo failed
    deactivate && echo done
  '';
}
output
Testing python2.7
ValueError: source and destination is the same /nix/store/38kz3j1a87cq5y59k5w7k9yk4cqgc5b2-python-2.7.18/lib/python2.7/os.py
bash: .venv/bin/activate: No such file or directory
Python 3.7.7
import sqlite3 succeeded
import automat succeeded
deactivate: command not found

Testing python3.5
created virtual environment CPython3.5.9.final.0-64 in 814ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.5.9
import sqlite3 succeeded
import automat Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'automat'
failed
done

Testing python3.6
created virtual environment CPython3.6.10.final.0-64 in 1094ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.6.10
import sqlite3 succeeded
import automat Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'automat'
failed
done

Testing python3.7
created virtual environment CPython3.7.7.final.0-64 in 248ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.7.7
import sqlite3 succeeded
import automat Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'automat'
failed
done

Testing python3.8
created virtual environment CPython3.8.2.final.0-64 in 1335ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.8.2
import sqlite3 succeeded
import automat Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'automat'
failed
done

Testing python3.9
created virtual environment CPython3.9.0.alpha.4-64 in 1645ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.9.0a4
import sqlite3 succeeded
import automat Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'automat'
failed
done

Testing python3.7 without specifying interpreter to virtualenv
created virtual environment CPython3.7.7.final.0-64 in 257ms
  creator CPython3Posix(dest=/home/alab/ws/test-66366/.venv, clear=True, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/alab/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Python 3.7.7
import sqlite3 succeeded
import automat Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'automat'
failed
done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh just that i get this right. With both test scenarios the second comment of the original patch about loading sqlite3 is no longer an issue. So this means loading python modules from standard library is working, right?

And, the real question i am doubting right now is, is the scond test scenario the one that is adressing the first comment of the patch, about python2.7? And furthermore, is this scenario even correct? Do we want to be able to import automat here?

Copy link
Member Author

@calbrecht calbrecht May 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One step forward, python3 has additional base_exec_prefix and base_prefix attrs in sys. python2 does not have them. In brief explanation, they do point to the original python when in a virtual environment, and in nixos to the unwrapped python.

[nix-shell:~/ws/test-66366]$ python3.5 -c 'import sys; from pprint import pprint; pprint(vars(sys))' | grep prefix
 'base_exec_prefix': '/nix/store/0df1pj661i4m292b0v82gzp0d0i8m6hf-python3-3.5.9',
 'base_prefix': '/nix/store/0df1pj661i4m292b0v82gzp0d0i8m6hf-python3-3.5.9',
 'exec_prefix': '/nix/store/6clz676g768xrshsrwp677nm3n49wsky-python3-3.5.9-env',
 'prefix': '/nix/store/6clz676g768xrshsrwp677nm3n49wsky-python3-3.5.9-env',

vs.

[nix-shell:~/ws/test-66366]$ python2.7 -c 'import sys; from pprint import pprint; pprint(vars(sys))' | grep prefix
'exec_prefix': '/nix/store/20kmxkqlh3556pgk3bawj7pc4ab7hkm2-python-2.7.18-env',
 'prefix': '/nix/store/20kmxkqlh3556pgk3bawj7pc4ab7hkm2-python-2.7.18-env',

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also pkgs/development/interpreters/python/tests.nix for some tests regarding this behavior and venv.

@FRidh
Copy link
Member

FRidh commented May 23, 2020

@GrahamcOfBorg build pythonPackages.virtualenv python3Packages.virtualenv python38Packages.virtualenv

@FRidh
Copy link
Member

FRidh commented May 23, 2020

I've pushed dc80e07 and 2de446e. Thanks!

@FRidh FRidh closed this May 23, 2020
@globin globin deleted the virtualenv-fix-66366 branch May 23, 2020 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python virtualenv not working because of sys.prefix mismatch
3 participants