Reputation: 155
every time when I create a new conda env, I have pre-installed pip packages which I have installed in other env with the same python version. Is this right? I want to create a new env just with the necessary pip packages for a clean env.
I create a new env with:
conda create --name newenv python=3.8
Thats the same env on the picture, i tryed to uninstall and reinstall Anaconda navigator but the problem is still there.
Upvotes: 1
Views: 2093
Reputation: 6687
Every time a conda env is created one can specify default packages, by adding create_default_packages
on the .condarc
file.
If you want to ignore these default packages and for example install only some desired packages
conda create --no-default-packages -n myenv python=3.8 pycaret pandas scipy
or if you want these packages as default every time you create an environment add
create_default_packages:
- pip
- pycaret
- pandas
- scipy
to your .condarc
file.
A third option is to pass package requirements through an environment.yml
file through the --f
argument. From the docs
name: myenv
dependencies:
- python=3.8
- pip
- pycaret
- pandas
- scipy
Upvotes: 2