I use pip install packages in a conda environment.
pip install pygame
Requirement already satisfied: pygame in ./anaconda3/lib/python3.6/site-packages (1.9.4)
where the current directory is /Users/aptx4869
. However, when I type conda list
, there is nothing in the current environment. What's wrong with it? Here's the directory where the environment is at
/Users/aptx4869/anaconda3/envs/rl
I delete the pygame
in the root environment and run pip install pygame
in the rl
conda environment, I receive another message. But pygame
still doesn't show in conda list
pip install pygame
Collecting pygame
Using cached https://files.pythonhosted.org/packages/bc/19/57bf1e9c72be4f7afc1add56cc717b7f7fe8ef1b6b5fb58f031a06401d0f/pygame-1.9.4-cp36-cp36m-macosx_10_11_intel.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.4
(rl)
Notice (rl)
in the end, this pip
command still installs pygame
in the root environment
The reason is simply because I didn't install python and pip in the dl
environment, and conda implicitly uses python and pip in the root environment as I command pip install ...