PolarBear10
PolarBear10

Reputation: 2305

Using pip in a conda envirnment, does that install the package within that conda environment only?

I have activated my environment using

conda activate deep_learning

After I get the bracket with the environment name, I proceed with an installation using

pip install numpy

Is the numpy now only installed within that conda environment? Or is also installed on the system level.

This case is for a windows 10.

Upvotes: 2

Views: 171

Answers (2)

SDS0
SDS0

Reputation: 530

Usually yes, but it isn't necessarily a good idea - the conda package manager won't know about your pip installs, and you might get some quirky behaviour: https://www.anaconda.com/using-pip-in-a-conda-environment/

Common packages such as numpy and tensorflow can be installed using conda instead of pip.

If you just want to isolate a python environment and continue to manage packages with pip, you would be better off using venv/virtualenv.

Upvotes: 4

user3314148
user3314148

Reputation: 107

After creating your new environment, you need to make sure you also installed pip to the environment by running conda install pip.

Then, you need to go to the address you created your new env, and pip install newPackage. This way, you can make sure that you installed the new package only on the new env, not system level.

Upvotes: 1

Related Questions