conda and pip Introduction
conda
conda is the package and its dependencies and environmental management tools.
Applicable languages: Python, R, Ruby, Lua, Scala, Java, JavaScript, C / C ++, FORTRAN.
Application platform: Windows, macOS, Linux
use:
- Quick to install, run and upgrade packages and their dependencies.
- Easily created in the computer, save, load and switching environment.
If you need a package requires a different version of Python, you do not need to switch to a different environment, because conda is also an environmental manager. You need only a few commands, you can create a completely separate environment to run different versions of Python, while continuing to use your favorite Python version in your regular environment. --conda official website
conda for Python projects created, but can be applied to the above-mentioned languages.
conda package and environment manager is included in all versions of Anaconda them.
pip
pip for mounting and package management package manager.
pip written languages: Python.
Python version installed by default:
Python 2.7.9 and later: default installation, the command is pip
Python 3.4 and later: default installation, the command is pip3
origin of the name of the pip: pip uses a recursive acronym naming:
"Pip install Packages" ( "pip installation package")
Python install or update third-party packages
You can use conda
and the pip
command to install the package, however, do not use the pip
command to update conda package, which may cause environmental problems. When first using the Anaconda or Miniconda, better to use conda
updated packages.
Installation package
Python installed third party not included in the package of Anaconda. Under normal circumstances, you can use the command below:
conda install package_name
If the above command fails, you can use pip package management tool to install third-party packages:
pip install package_name
Update package
You can use conda update
the command to update the package:
conda update package_name
pip also supports use with a --upgrade
flag to the update package:
pip install --upgrade package_name