pythonconda

How do I add Pandas to a Conda environment?


I just got conda and set up an environment named ct-env which contains the tool cantera and was recently activated. Now I would like to use pandas in a script, my anaconda distribution installed it and pandas is available in the base environment. How do I bring it to the ct-env environment?

So using conda list in the prompt i can indeed see pandas being present among the listed packages in base but when i activate ct-env pandas is not present anymore.


Solution

  • The reason pandas isn't available in your ct-env environment is because conda environments are isolated.

    Activate your environment:

    conda activate ct-env
    

    Install pandas:

    conda install pandas
    

    Just because pandas is in your base environment doesn't mean it's automatically available in other environments.