After I run the
conda env create -f environment.yml in Conda, I receive the following warning:
Warning : you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies…
What does this mean and what should I be doing instead?
In your environment yml file under list of the packages you install through conda you must also add pip as a package to be installed. This installs the pip, and so your pip packages can be installed using this pip.
Previously pip was shipped with conda but now we have to explicitly install pip when using conda
When creating an environment the warning disappeared by including
- pip explicitly in the yaml file. Yes, it is a bit awkward because if your environment has pip packages you already have declared that you used pip packages with
The yaml file would look like:
# Packages omitted for simplicity
At the time of creating a new environment from scratch this warming can be avoided by explicitly installing pip, for instance with:
conda create -n env_with_pip python=3.7 numpy pip