Home > Software engineering >  Installing packages with pip
Installing packages with pip

Time:05-14

I have been advised using pip in a Anaconda virtual environment is bad. But some packages are not on conda or on conda forge.

When I run

conda activate virtualenv
where pip

I get two paths, one which is outside the environment

C:\Anaconda\virtualenv\Scripts\pip.exe
C:\Anaconda\Scripts\pip.exe

How do I fix it, so that when I do pip install package it only installs in the virtual environment?

CodePudding user response:

The command line should use the first pip it finds, which in your case is the one in the virtual environment. This pip will only install packages in your environment. You can check which one is running with pip --version.

  • Related