Setting up the ROOT Environment on vscode-server

Hi,
I am having some trouble with my environment on the Uni’s server where I am trying to work.

I want to use pyroot, for which I use the following script.

source /user/software/root/rootSetup.sh 6.24.06
# Root is built for python 3.6.3
# source /user/software/python/pythonSetup.sh 3.6.3
conda deactivate
conda activate hep

The hep conda environment is python 3.6.3 and running import ROOT in a python interpreter from the terminal works beautifully.
Unfortunately, I am trying to use a jupyter notebook with vscode. I connect to the server from vsc using the ssh extension. I had to put the ealier script into .baschrc for vscode to load it (is there is an alternative way to make the vscode environment recognise root?)
When I make a jupyter notebook to import ROOT I get the error
ImportError: dynamic module does not define module export function (PyInit_libPyROOT)
which does not happen in the integrated terminal with the same environment.


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.24/06
Platform: CentOS7
Compiler: linuxx8664gcc


Hello @lost_soul_519, welcome to the ROOT Forum.

Off the top of my head, version 6.24 is 3 years old at this point, so your problem might be due to an incompatibility between the two environments (the fact you need to rely on a bashrc suggests this may be the case).
Not being a vscode user myself, I cannot help you much here, but @jonas or @Danilo might have more insight on this.

Hello @silverweed , thanks for your response.

I totally understand the version is ancient. But unfortunately that is the most recent available on the Uni’s server. I would totally love to use my own installation through conda but unfortunately the conda install conflicts with the ROOT on the server. I get the error
Fatal in <TROOT::InitInterpreter>: cannot load library /user/software/root/root-cc7/lib/libRIO.so: undefined symbol: gMmallocDesc
Which I understand is obv loading the wrong library but I don’t think I should add conda to the LD_LIBRARY_PATH because of Using shared libraries — conda-build 0.0.0.dev0+placeholder documentation

Let me know if you have any suggestions.

Sincerely,
Lost Soul 519