2

Since I am using Spider, I should use "conda install". But some packages can not be installed in "conda install" while they easily can be installed in "pip install". For example, I installed Keras in "pip install" but in Spider, Keras can not be imported (Keras is not known). Then, I again installed Keras in conda install form.

On the other hand, some packages which were installed in "conda install" could be used and imported in python IDE or Spyder and vice versa.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Morteza
  • 85
  • 1
  • 6
  • I like your question... I'm also curious about the difference of `conda install` & `pip install` I know that `conda` I think can install package that are not from `pypi`? but the thing is I see some devs who do `pip` instead of `conda` in the `anaconda` distribution. I hope someone could add it up. I could also do some search of course :) – Ice Bear Jan 02 '21 at 05:11

1 Answers1

6

pip install installs python packages in any environment

conda install installs any package in conda environments

An example would be the tensorflow library, pip requires CUDA and other software requirements to be preinstalled, but conda installs all necessary and compatible dependencies automatically.

Also as rightly pointed out pip installs from PyPi and conda gets packages from its own anaconda repo.

pip on the other hand has advantages, that it can install packages that conda doesn't have and also it supports system wide installs for packages.

Check out: What is the difference between pip and conda?

Also: Understanding Conda and Pip

Ishan
  • 859
  • 5
  • 9