Skip to content

Instantly share code, notes, and snippets.

@fenghaolin
fenghaolin / conda_pip_usage.md
Last active August 23, 2023 13:52
It is tricky to use pip in a conda environment

Using pip and conda together can break things

  • According to this blog from Anaconda, it is tricky to use pip in a conda environment.
  • The main subtleness comes conda's limited abilities to control packages installed by pip or other package managers.

Best Practices Checklist

Use conda environments for isolation

  • create a conda environment to isolate any changes pip makes
  • environments take up little space thanks to hard links
  • care should be taken to avoid running pip in the 'root' environment
@fenghaolin
fenghaolin / CUDA-12-1-1-pytorch.md
Created August 23, 2023 06:13 — forked from Birch-san/CUDA-12-1-1-pytorch.md
Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Should you keep your NVIDIA driver?

CUDA 12.1.1 toolkit is gonna offer to install Nvidia driver 530 for us. It's from New Feature branch. It's likely to be newer than the default Nvidia driver you would've installed via apt-get (apt would prefer to give you 525, i.e. Production Branch).

If you're confident that you already have a new enough Nvidia driver for CUDA 12.1.1, and you'd like to keep your driver: feel free to skip this "uninstall driver" step.

But if you're not sure, or you know your driver is too old: let's uninstall it. CUDA will install a new driver for us later.