1

I've been developing my project with pip (django, drm etc). Now I need to use faiss, which only has unofficial package on pip (official - in conda). What should I do in this situation? Can I combine them somehow? Or should I migrate to conda?

Alexander Farkas
  • 529
  • 3
  • 11
  • What do you mean by "Can I combine them somehow?". Are you asking if you can have `conda` and `pip` installed packages in the same environment? – FlyingTeller Jan 29 '21 at 10:48

1 Answers1

2

If you're using a non-conda environment, then you're limited to using pip only. That is, pip does not know how to install conda packages.

But if you switch to using conda, then you can use either. The general recommendation is to install everything with conda if possible, but use pip when you have no other choice.

I recommend installing Miniconda, then creating a new environment for all of your dependencies. If necessary, add pip-only dependencies (if you have any).

conda create --name alex python=3.8 pip django requests bla-bla-bla
conda activate alex
pip install drm foo bar yada-yada

If you need uncommon or bleeding-edge packages, you might also consider obtaining your conda packages from the conda-forge channel, rather than the defaults channel. See here for instructions.

merv
  • 67,214
  • 13
  • 180
  • 245
Stuart Berg
  • 17,026
  • 12
  • 67
  • 99
  • @AlexandrFarkas please see the edit above -- don't forget to `activate` the environment before calling `pip`! (Thanks @merv.) – Stuart Berg Feb 01 '21 at 01:51