'Installing packages with pip
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?
Solution 1:[1]
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
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | LukasNeugebauer |