0

I opened the command prompt on Ubuntu. Then, I created a new environment with conda create -n newEnv python=3.6.9 command.Then I activated the newEnv enviroment with using conda activate newEnv command. After that, I saw the pre-installed packages which comes with python=3.6.9 with using conda list command. The output was like this:

# packages in environment at /home/t/anaconda3/envs/newEnv:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
ca-certificates           2019.5.15                  ....   
certifi                   2019.6.16                  ....
libedit                   3.1.20181209               ....
libffi                    3.2.1                      ....
libgcc-ng                 9.1.0                      ....
libstdcxx-ng              9.1.0                      ....
ncurses                   6.1                        ....
openssl                   1.1.1c                     ....
pip                       19.2.2                     ....
python                    3.6.9                      ....
readline                  7.0                        ....
setuptools                41.0.1                     ....  
sqlite                    3.29.0                     ....
tk                        8.6.8                      ....
wheel                     0.33.4                     ....   
xz                        5.2.4                      ....
zlib                      1.2.11                     ....

For me, everything is normal until now. After that, I installed the pandas package with using pip install pandas command, It gives an output like this:

Installing collected packages: numpy, pytz, six, python-dateutil, pandas
Successfully installed numpy-1.17.1 pandas-0.25.1 python-dateutil-2.8.0 pytz-2019.2 six-1.12.0

However, after that, when I type conda list command, I couldn't see the successfully installed packages like pandas, numpy,pytz etc(installed with pandas above). conda list gave same output like this:

# packages in environment at /home/t/anaconda3/envs/newEnv:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
ca-certificates           2019.5.15                  ....   
certifi                   2019.6.16                  ....
libedit                   3.1.20181209               ....
libffi                    3.2.1                      ....
libgcc-ng                 9.1.0                      ....
libstdcxx-ng              9.1.0                      ....
ncurses                   6.1                        ....
openssl                   1.1.1c                     ....
pip                       19.2.2                     ....
python                    3.6.9                      ....
readline                  7.0                        ....
setuptools                41.0.1                     ....  
sqlite                    3.29.0                     ....
tk                        8.6.8                      ....
wheel                     0.33.4                     ....   
xz                        5.2.4                      ....
zlib                      1.2.11                     ....

Why don't seen the pandas package in the output of the conda list command? Although it is succesfully installed with pip install pandas command.

javac
  • 441
  • 4
  • 20
  • Possible duplicate of [Difference between pip freeze and conda list](https://stackoverflow.com/questions/41249401/difference-between-pip-freeze-and-conda-list) – Simba Sep 18 '19 at 06:23
  • Can you verify that those packages actually installed in the env (i.e., `/home/t/anaconda3/envs/newEnv/lib/python3.6/site-packages`)? Generally, it is bad practice to use `pip` to install packages that are readily available through Anaconda Cloud. Please read "[*Using Pip in a Conda Environment*](https://www.anaconda.com/using-pip-in-a-conda-environment/)". – merv Sep 20 '19 at 15:00

1 Answers1

2

Conda will list packages installed by conda.

You would better off using Conda to install pandas.

conda activate newEnv
conda install pandas

Although conda and pip can see each other's packages (mostly), you are better off sticking to one or the other to avoid conflicts.

James
  • 32,991
  • 4
  • 47
  • 70
  • But I want to use pip, why conda can't see the installed packages by pip. – javac Sep 03 '19 at 07:50
  • @EasterGamer why do you want to use `pip` to install a package that is available via `conda`? – nekomatic Sep 03 '19 at 14:17
  • @EasterGamer you're really better off not using `pip` when possible. See "[Using Pip in a Conda Environment](https://www.anaconda.com/using-pip-in-a-conda-environment/)." It can lead to an unstable environment, and `pip` and `conda` don't have full interoperability. It's mainly provided as a convenience, for packages that aren't available through Conda channels. – merv Sep 03 '19 at 16:46