# ROOT is installed but . bin/thisroot.sh is not working

**URL:** <https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581>\
**Category:** Newbie\
**Tags:** python\
**Created:** [April 25, 2021, 12:44am UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581 "2021-04-25T00:44:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kittyk123](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kittyk123/32/25724_2.png) [@Kittyk123](https://root-forum.cern.ch/u/Kittyk123)\
**Post date:** [April 25, 2021, 12:44am UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/1 "2021-04-25T00:44:19Z")

</div>

I have Windows 10 64 bit and Python 3.7.9 installed with Anaconda3. I have both VS2015 and VS2019 installed so I did a source build from GitHub so I could verify I was building against the proper versions of VS and python. Everything is installed. I have tried to run

. bin/thisroot.sh

but I get the error

‘.’ is not recognized as an internal or external command,  
operable program or batch file.

I have also tried

source ./thisroot.sh

which gives an error

‘source’ is not recognized as an internal or external command,  
operable program or batch file.

I have tried

C:\Users\Kat\root\_build\>PATH = . bin/thisroot.sh

which runs, but I am not sure if this does what I want, and despite this last line I still cannot open root. Any help is VERY much appreciated! Thank you!

* * *

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [April 25, 2021, 4:49am UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/2 "2021-04-25T04:49:10Z")

</div>

I don’t use Anaconda, so I don’t know if it is different, but sh scripts are for Linux, not Windows. Try just adding the “bin” path (maybe “C:\Users\Kat\root\_build\bin”?) to your Windows path environment variable, either for the user or for the system.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 25, 2021, 10:06am UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/3 "2021-04-25T10:06:22Z")

</div>

Use `C:\Users\Kat\root_build\bin\thisroot.bat`

---

<div class="post-metadata">

**Author:** ![Kittyk123](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kittyk123/32/25724_2.png) [@Kittyk123](https://root-forum.cern.ch/u/Kittyk123)\
**Post date:** [April 25, 2021, 9:42pm UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/4 "2021-04-25T21:42:28Z")

</div>

Ok! Thank you! I had added the root installation dir to my Windows environmental variables, so let me try this instead!

---

<div class="post-metadata">

**Author:** ![Kittyk123](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kittyk123/32/25724_2.png) [@Kittyk123](https://root-forum.cern.ch/u/Kittyk123)\
**Post date:** [April 25, 2021, 10:35pm UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/5 "2021-04-25T22:35:27Z")

</div>

I am definitely new and trying to learn to please bare with me. I tried

(base) C:\Users\Kat\root\_build\>PATH = C:\Users\Kat\root\_build\bin\thisroot.bat

which runs. I also tried setting the Windows environmental variables to variations of what was suggested above, but root is not recognized when I try to open it. When I do

C:\Users\Kat\> dir

I see root and root\_build. Neither of these appear when I search for installed conda packages (I was under the impression that ROOT installed as a package since I will be importing it into Python, please let me know if I am wrong). When I check environmental variables I have ROOTSYS set to my root installation dir (ROOTSYS=root). I tried to set  
conda env export ROOTSYS= C:\Users\Kat\root\_build\bin\thisroot.bat

but that gives an error that ROOTSYS= C:\Users\Kat\root\_build\bin\thisroot.bat.

Thank you all in advance for your help!

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 26, 2021, 6:09am UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/6 "2021-04-26T06:09:39Z")

</div>

> [@Kittyk123](#):
>
> (base) C:\Users\Kat\root\_build\>PATH = C:\Users\Kat\root\_build\bin\thisroot.bat
> 
> which runs. I also tried setting the Windows environmental variables to variations of what was suggested above, but root is not recognized when I try to open it. When I do

It’s not what I showed. You can either type, in the command prompt:

```auto
C:\Users\Kat>root_build\bin\thisroot.bat

```

Or manually set the environment variables (still in the command prompt):

```auto
C:\Users\Kat>set ROOTSYS=C:\Users\Kat\root_build
C:\Users\Kat>set PATH=%ROOTSYS%\bin;%PATH%

```

Then you should be able to start ROOT:

```auto
C:\Users\Kat>root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.25/01 https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win32 on Apr 22 2021, 14:16:01 |
  | From heads/master@v6-25-01-712-gd05c6236c5 |
  | With MSVC 19.24.28319.0 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------------

root [0]

```

---

<div class="post-metadata">

**Author:** ![Kittyk123](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kittyk123/32/25724_2.png) [@Kittyk123](https://root-forum.cern.ch/u/Kittyk123)\
**Post date:** [April 26, 2021, 11:44pm UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/7 "2021-04-26T23:44:29Z")

</div>

Thank you for being explicit! I followed what you did exactly, and I can’t open root from my Anaconda prompt, but when I try in Spyder 5 I get

[1] import ROOT  
Traceback (most recent call last):

File “C:\Users\Kat\root\_build\bin\cppyy\__init_\_.py”, line 60, in   
importlib.import\_module(libcppyy\_mod\_name)

File “C:\Users\Kat\anaconda3\lib\importlib\__init_\_.py”, line 127, in import\_module  
return \_bootstrap.\_gcd\_import(name[level:], package, level)

File “”, line 1006, in \_gcd\_import

File “”, line 983, in \_find\_and\_load

File “”, line 965, in \_find\_and\_load\_unlocked

ModuleNotFoundError: No module named ‘libcppyy3\_7’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “”, line 1, in   
import ROOT

File “C:\Users\Kat\root\_build\bin\ROOT\__init_\_.py”, line 22, in   
import cppyy

File “C:\Users\Kat\root\_build\bin\cppyy\__init_\_.py”, line 64, in   
libcppyy\_mod\_name, major, minor))

ImportError: Failed to import libcppyy3\_7. Please check that ROOT has been built for Python 3.7

At least Python is finding ROOT!

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 27, 2021, 6:06am UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/8 "2021-04-27T06:06:23Z")

</div>

OK, sorry, I have no experience with `Anaconda` or `Spyder` and can’t help with that. Can you try from a regular `Command Prompt`, or even better from a `x86 Native Tools Command Prompt for VS 2019` (from the `Visual Studio 2019` entry of the Windows start menu)?

---

<div class="post-metadata">

**Author:** ![Kittyk123](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kittyk123/32/25724_2.png) [@Kittyk123](https://root-forum.cern.ch/u/Kittyk123)\
**Post date:** [April 28, 2021, 2:54am UTC](https://root-forum.cern.ch/t/root-is-installed-but-bin-thisroot-sh-is-not-working/44581/9 "2021-04-28T02:54:03Z")

</div>

Hmm. I definitely could try both of those! Thank you.
