Python Forum
Different out when using conda list and pip list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different out when using conda list and pip list
#2
Do pip -V and see where it point to.
If create with conda create -n venv then no pip will be installed.
OS will still try resolve pip on your PATH,so is probably finding the base pip in the Anaconda/miniconda/Python.org install.

So this is how i create environment,will get newest Python 3.10.1(with pip) and switch to conda-forge channel.
# First update conda in base environment  
conda update conda

# Make environment
conda create -n your_env python=3.10.1 -c conda-forge -y
Test.
(tom_env) G:\div_code
λ pip -V
pip 21.3.1 from G:\miniconda3\envs\tom_env\lib\site-packages\pip (python 3.10)

(tom_env) G:\div_code
λ python -V
Python 3.10.1

(tom_env) G:\div_code
λ conda -V
conda 4.11.0

(tom_env) G:\div_code
λ which python
/g/miniconda3/envs/tom_env/python

(tom_env) G:\div_code
λ which pip
/g/miniconda3/envs/tom_env/Scripts/pip
See that all point to my environment tom_env.

So if i eg install Pandas also numpy will be install
(tom_env) G:\div_code
λ conda install pandas
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: G:\miniconda3\envs\tom_env

  added / updated specs:
    - pandas


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    numpy-1.22.0               |  py310hcae7c84_0         5.9 MB  conda-forge
    pandas-1.3.5               |  py310hf5e1058_0        11.2 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        17.0 MB

The following NEW packages will be INSTALLED:

  intel-openmp       conda-forge/win-64::intel-openmp-2022.0.0-h57928b3_3663
  libblas            conda-forge/win-64::libblas-3.9.0-12_win64_mkl
  libcblas           conda-forge/win-64::libcblas-3.9.0-12_win64_mkl
  liblapack          conda-forge/win-64::liblapack-3.9.0-12_win64_mkl
  mkl                conda-forge/win-64::mkl-2021.4.0-h0e2418a_729
  numpy              conda-forge/win-64::numpy-1.22.0-py310hcae7c84_0
  pandas             conda-forge/win-64::pandas-1.3.5-py310hf5e1058_0
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
  pytz               conda-forge/noarch::pytz-2021.3-pyhd8ed1ab_0
  six                conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
  tbb                conda-forge/win-64::tbb-2021.5.0-h2d74725_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
numpy-1.22.0         | 5.9 MB    | ############################################################################################################# | 100%
pandas-1.3.5         | 11.2 MB   | ############################################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(tom_env) G:\div_code
λ pip show numpy
Name: numpy
Version: 1.22.0
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD
Location: g:\miniconda3\envs\tom_env\lib\site-packages
Requires:
Required-by: pandas

(tom_env) G:\div_code
λ conda list
# packages in environment at G:\miniconda3\envs\tom_env:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
intel-openmp              2022.0.0          h57928b3_3663    conda-forge
libblas                   3.9.0              12_win64_mkl    conda-forge
libcblas                  3.9.0              12_win64_mkl    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
liblapack                 3.9.0              12_win64_mkl    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
mkl                       2021.4.0           h0e2418a_729    conda-forge
numpy                     1.22.0          py310hcae7c84_0    conda-forge
openssl                   3.0.0                h8ffe710_2    conda-forge
pandas                    1.3.5           py310hf5e1058_0    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
python                    3.10.1          hcf16a7b_2_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
setuptools                60.5.0          py310h5588dad_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
tbb                       2021.5.0             h2d74725_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
vc                        14.2                 hb210afc_6    conda-forge
vs2015_runtime            14.29.30037          h902a5da_6    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
See that pip and conda both point to numpy 1.22.0.
Reply


Messages In This Thread
RE: Different out when using conda list and pip list - by snippsat - Jan-14-2022, 09:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strange behavior list of list mmhmjanssen 2 223 May-01-2024, 07:16 AM
Last Post: Gribouillis
  No matter what I do I get back "List indices must be integers or slices, not list" Radical 4 1,237 Sep-24-2023, 05:03 AM
Last Post: deanhystad
  Delete strings from a list to create a new only number list Dvdscot 8 1,593 May-01-2023, 09:06 PM
Last Post: deanhystad
  Confused over Conda Package manager vs PIP JanOlvegg 3 1,255 Mar-09-2023, 02:09 PM
Last Post: JanOlvegg
  List all possibilities of a nested-list by flattened lists sparkt 1 947 Feb-23-2023, 02:21 PM
Last Post: sparkt
  How to deactivate correctly a conda environment NoNameoN 2 1,976 Nov-04-2022, 01:43 PM
Last Post: NoNameoN
  Сheck if an element from a list is in another list that contains a namedtuple elnk 8 1,886 Oct-26-2022, 04:03 PM
Last Post: deanhystad
Question Keyword to build list from list of objects? pfdjhfuys 3 1,613 Aug-06-2022, 11:39 PM
Last Post: Pedroski55
  Split a number to list and list sum must be number sunny9495 5 2,343 Apr-28-2022, 09:32 AM
Last Post: Dexty
  How to check if a list is in another list finndude 4 1,870 Jan-17-2022, 05:04 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020