Bioconductor / basilisk

Clone of the Bioconductor repository for the basilisk package.
https://bioconductor.org/packages/devel/bioc/html/basilisk.html
GNU General Public License v3.0
27 stars 14 forks source link

notice on pip changes/2020-resolver #9

Closed vjcitn closed 3 years ago

vjcitn commented 3 years ago

This popped up in a recent update to vjcitn/oc2bioc, FWIW

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

h5pyd 0.7.1 requires pytz, which is not installed.

I'll file more details if it seems important.

LTLA commented 3 years ago

Ideally one should fill out as many dependencies with conda as possible, and then pip only has to install the few desired packages on top of it. I recently modified listPackages() (1.1.16) to fix some previously mentioned weirdness so that it returns real version numbers; I also added a backdoor (see ?setupBasiliskEnv) to allow you to pass in unversioned packages, for easier construction and interrogation of a functional Conda environment.

In your case, the idea would be to:

  1. Make the environment as you have already done.
  2. Run listPackages() on your environment directory.
  3. Identify all extra dependencies that got installed, presumably by pip.
  4. Install those dependencies with Conda via packages= but without version numbers, setting basilisk:::globals$set(no.version=TRUE) to avoid having to use pip's version numbers (as the same versions might not be available for conda).
  5. Run listPackages() again to figure out the versions of all dependencies that Conda chose.
  6. Insert those versions into your packages= statement.

Then any pip weirdness is limited to the few packages that are only available on PyPI.

vjcitn commented 3 years ago

Thanks.