anopheles-genomic-surveillance / anopheles-genomic-surveillance.github.io

Lecture notes for a course on genomic surveillance of malaria vectors, developed by PAMCA and MalariaGEN
https://anopheles-genomic-surveillance.github.io/
Creative Commons Attribution Share Alike 4.0 International
7 stars 21 forks source link

Use %pip instead of !pip #193

Closed alimanfoo closed 3 months ago

alimanfoo commented 8 months ago

Jupyter notebooks generally support a %pip line magic command, which runs pip and is guaranteed to install packages into whatever environment is being used to run the current kernel.

The more general !pip can be used to run pip as a system command, which will install packages into the base environment.

On colab, either works the same. However, on Amazon Sagemaker Studio Lab, %pip is required to ensure packages are installed in the current environment. This is probably a generally safer option.

For future compatibility with sagemaker lab, suggest we switch over notebooks here to using %pip.

jonbrenas commented 3 months ago

It is possible to figure it out from the references but I think it might help to have a list of PRs addressing this in order:

W1M1: probably #195 (merged) W1M2: probably #195 (merged) W1M3: probably #195 (merged) W1M4: probably #195 (merged)

W2M1: probably #201 (merged) W2M2: No package is installed W2M3: probably #201 (merged) W2M4: probably #201 (merged)

W3M1: No package is installed W3M2: No package is installed W3M3: probably #210 (merged) W3M4: probably #210 (merged)

W4M1: No package is installed W4M2: No package is installed W4M3: probably #218 (merged) W4M4: probably #218 (merged)

W5M1: #239 (merged) W5M2: No package is installed W5M3: probably #228 (merged) W5M4: #244 (merged)

W6M1: #229 (merged) W6M2: No package is installed W6M3: #231 (merged) W6M4: #230 (merged)

W7M1: #232 (merged) W7M2: #240 (merged) W7M3: #243 (merged) W7M4: #260 (merged)

W8M1: No package is installed W8M2: No package is installed W8M3: No package is installed W8M4: No package is installed

jonbrenas commented 3 months ago

All branches have been merged.