# ROOT build with Python 3.7 in centos7

**URL:** <https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162>\
**Category:** ROOT\
**Tags:** python, root\
**Created:** [January 18, 2023, 3:51pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162 "2023-01-18T15:51:29Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amey](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@Amey](https://root-forum.cern.ch/u/Amey)\
**Post date:** [January 18, 2023, 3:51pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/1 "2023-01-18T15:51:29Z")

</div>

Hello ,

I want to load ROOT in my conda environment. The conda environment has Python 3.7 and I am unable to find ROOT build with centos7 and Python3.7. I am checking in sft.cern.ch and slc7 cmssw builds.

Any suggestion would be helpful in this regard.

Thank you.  
Amandeep Kaur

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [January 18, 2023, 4:01pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/2 "2023-01-18T16:01:39Z")

</div>

Hi @Amey,

Did you checked the instructions for installing ROOT with Conda in [Installing ROOT - ROOT](https://root.cern/install/#conda)?

Cheers,  
J.

---

<div class="post-metadata">

**Author:** ![Amey](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@Amey](https://root-forum.cern.ch/u/Amey)\
**Post date:** [January 18, 2023, 4:14pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/3 "2023-01-18T16:14:31Z")

</div>

Hi,

Thank you.  
I am avoiding to that. Since, I am downloading on my serve, ROOT and other packages (COFFEA, DASK, UPROOT) need to be compatible with each other. I have gone through this issue, so just want to load an already built ROOT 🙂

–  
Amandeep Kaur

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [January 18, 2023, 4:20pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/4 "2023-01-18T16:20:33Z")

</div>

What about something like

```bash
$ conda install -c conda-forge -n your_existing_environment root

```

?

---

<div class="post-metadata">

**Author:** ![Amey](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@Amey](https://root-forum.cern.ch/u/Amey)\
**Post date:** [January 18, 2023, 4:22pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/5 "2023-01-18T16:22:54Z")

</div>

Thanks,

I can give this a try in my existing environment. I was first installing the ROOT and then different packages.

–  
Amandeep Kaur

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [January 18, 2023, 4:24pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/6 "2023-01-18T16:24:34Z")

</div>

You must ensure that all your utilities are compiled with the same C++ compiler (e.g., the one provided by conda).

---

<div class="post-metadata">

**Author:** ![Amey](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@Amey](https://root-forum.cern.ch/u/Amey)\
**Post date:** [January 18, 2023, 7:55pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/7 "2023-01-18T19:55:19Z")

</div>

Hi,

I am asking conda to install ROOT and it is taking forever to solve the environment (~2 hrs). Is this expected? I am adding the lines below which it printed :

Collecting package metadata (current\_repodata.json): done  
Solving environment: failed with initial frozen solve. Retrying with flexible solve.  
Collecting package metadata (repodata.json): done  
Solving environment: /

–Amandeep Kaur

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [January 19, 2023, 12:28pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/8 "2023-01-19T12:28:54Z")

</div>

Hi,  
conda is notoriously slow. I find myself much better when using [mamba](https://mamba.readthedocs.io/en/latest/index.html). It’s the same as using conda, but much faster. I suggest you read the docs, but the following steps should already give you a minimal working environment (taken from [here](https://github.com/conda-forge/miniforge#unix-like-platforms)):

```auto
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh
# The bash script will install mamba into a folder of your choice
# For simplicity, in the following I suppose you installed it
# in a folder called `mambaforge` in the same directory where you
# ran the bash script.
source mambaforge/bin/activate
mamba create -n myenv root python==3.7.*

```

---

<div class="post-metadata">

**Author:** ![Amey](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@Amey](https://root-forum.cern.ch/u/Amey)\
**Post date:** [January 19, 2023, 6:09pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/9 "2023-01-19T18:09:08Z")

</div>

Thank you everyone for all the suggestion.

I had let the ‘conda’ solve the ‘root’ environment last evening, and it solved it overnight.  
There should be another way to make this faster.

Thanks again,  
Amandeep Kaur

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [January 19, 2023, 6:21pm UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/10 "2023-01-19T18:21:32Z")

</div>

@Amey Note that you should strictly use the “`conda-forge`” channel: [ROOT → Install → Install via a package manager → Conda](https://root.cern/install/#conda)

---

<div class="post-metadata">

**Author:** ![Amey](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@Amey](https://root-forum.cern.ch/u/Amey)\
**Post date:** [January 20, 2023, 12:26am UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/11 "2023-01-20T00:26:59Z")

</div>

Thanks, Yes, I made sure that I use conda-forge. 🙂

–  
Amandeep Kaur

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [February 3, 2023, 12:27am UTC](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/12 "2023-02-03T00:27:46Z")

</div>

Closed on February 3, 2023, 12:27am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
