# ROOT Installs with Python 3.8.2

**URL:** <https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044>\
**Category:** ROOT\
**Tags:** python\
**Created:** [June 23, 2020, 2:31pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044 "2020-06-23T14:31:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpsatt](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/f1d935/32.png) [@tpsatt](https://root-forum.cern.ch/u/tpsatt)\
**Post date:** [June 23, 2020, 2:31pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044/1 "2020-06-23T14:31:38Z")

</div>

I’m unable to use pyROOT and I’ve determined the problem is that ROOT installs with Python 3.8.2, yet I have Python 3.8.3 installed on my computer. I’ve tried reinstalling ROOT via Homebrew, which says it depends on 3.8.3, yet the installation still seems to want a non-existent 3.8.2 binary. Whenever I try to import ROOT in 3.8.3, I get a module not found error. Is there a way to force ROOT to install with 3.8.3? Thanks.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [June 23, 2020, 2:33pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044/2 "2020-06-23T14:33:23Z")

</div>

I guess @etejedor can help you.

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [June 23, 2020, 3:11pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044/3 "2020-06-23T15:11:48Z")

</div>

Try `export PYTHONPATH=$(root-config --libdir)`, and please make sure to use the Python interpreter from Homebrew (i.e. likely from `/usr/local/bin` and linked somewhere into `/usr/local/Cellar`).

---

<div class="post-metadata">

**Author:** ![tpsatt](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/f1d935/32.png) [@tpsatt](https://root-forum.cern.ch/u/tpsatt)\
**Post date:** [June 23, 2020, 3:22pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044/4 "2020-06-23T15:22:48Z")

</div>

Perfect. That solved it. Thank you!

---

<div class="post-metadata">

**Author:** ![henryiii](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/henryiii/32/14065_2.png) [@henryiii](https://root-forum.cern.ch/u/henryiii)\
**Post date:** [June 23, 2020, 3:29pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044/5 "2020-06-23T15:29:39Z")

</div>

This should be easier with ROOT 6.22, I’m working on getting it setup as a nicer Python package, and if you want to use Python 3.8 (which you have to with ROOT’s formula), you still have to access it directly from the full path or add the directory to the path (as done above), since Homebrew still defaults to Python 3.7. That should be changed in the very near future, as they are preparing the last batch of formula for the 3.8 transition, and after that, 3.8 will become the default.

---

<div class="post-metadata">

**Author:** ![henryiii](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/henryiii/32/14065_2.png) [@henryiii](https://root-forum.cern.ch/u/henryiii)\
**Post date:** [June 24, 2020, 1:10pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044/6 "2020-06-24T13:10:18Z")

</div>

New version is in; ROOT 6.22.00 with fixed Python support. Run `brew info python@3.8` to see the caveats; you should see something like `/usr/local/opt/python@3.8/bin/python3` as the install location - you’ll need to use this Python with ROOT. Once the [final Python 3.8 migration patch](https://github.com/Homebrew/homebrew-core/pull/54912) goes in (I _think_ it’s waiting on a fix in brew itself to ease the transition), that caveat will go away and python3 Other than that, ROOT should now work correctly without thisroot.sh scripts, even for Python.

---

<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:** [July 8, 2020, 1:10pm UTC](https://root-forum.cern.ch/t/root-installs-with-python-3-8-2/40044/7 "2020-07-08T13:10:23Z")

</div>

Closed on July 8, 2020, 1:10pm UTC

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