Closed fxh90 closed 4 years ago
Can you show me the output of env
immediately before you run this? Can you try running conda activate
then seeing if it still fails?
If it still doesn't work, installing root
in the same environment as the anaconda
distribution of packages is probably fragile. Try making a separate environment:
# First time only, install some packages in a separate "environment" with a unique name
conda create --name my-environment-name python=3 root ipython
# Run this every time you want to activate the environment
conda activate my-environment-name
# You can then run "conda install" if you want to add more packages
Can you show me the output of
env
immediately before you run this? Can you try runningconda activate
then seeing if it still fails?If it still doesn't work, installing
root
in the same environment as theanaconda
distribution of packages is probably fragile. Try making a separate environment:# First time only, install some packages in a separate "environment" with a unique name conda create --name my-environment-name python=3 root ipython # Run this every time you want to activate the environment conda activate my-environment-name # You can then run "conda install" if you want to add more packages
Thank you for your reply. The out of of env
is as below:
Can you show me the output of
env
immediately before you run this? Can you try runningconda activate
then seeing if it still fails?If it still doesn't work, installing
root
in the same environment as theanaconda
distribution of packages is probably fragile. Try making a separate environment:# First time only, install some packages in a separate "environment" with a unique name conda create --name my-environment-name python=3 root ipython # Run this every time you want to activate the environment conda activate my-environment-name # You can then run "conda install" if you want to add more packages
I tried to run conda create --name roottest python=3 root ipython
to create a Conda environment named roottest. After that, when importing ROOT from python, it returns:
Error in <TFile::TFile>: file anaconda3/envs/roottest/lib/libNet_rdict.pcm does not exist
Error in <TFile::TFile>: file anaconda3/envs/roottest/lib/libTree_rdict.pcm does not exist
Error in <TFile::TFile>: file anaconda3/envs/roottest/lib/python3.7/site-packages/libPyROOT_rdict.pcm does not exist
And when trying to attach file with root -l filename
, the output is:
Attaching file gain_calibration.root as _file0...
Error in <TFile::TFile>: file anaconda3/envs/roottest/lib/libNet_rdict.pcm does not exist
(TFile *) 0x7fa660f44c10
Previously I had ROOT installed using dmg. However, it linked to the built-in Python 2 on my Mac, as I hadn't got Anaconda at that time. So, after installation of Anaconda, I removed the Root folder from Application and reinstalled using Conda.
Is this solved?
No, unfortunately.
@chrisburr @henryiii, I saw this issue and asked @vgvassilev what could be a problem (there were some changes in master recently that can affect loading of _rdicts).
@fxh90 are you using 6.18.04? I think it was updated 7 days ago (https://github.com/conda-forge/root-feedstock/commit/6928edb0a0f15d65160d82ec20d791cd70642aa9#diff-e178b687b10a71a3348107ae3154e44c).
@chrisburr @henryiii are the _rdicts and .lib in the same directory?
I've managed to reproduce the issue locally. The problem is that your prefix of your conda installation isn't normalised (it has two slashes on the front). I'm not sure if the actual problem is a ROOT or conda bug but regardless I think the installer should normalise the path for you.
@fxh90 The easiest solution for you is to reinstall conda without the double forward slash at the front.
@oshadura Yes they are in the same directory
I noticed the odd double slashes; I was also going to ask if /anaconda3/lib/libNet_rdict.pcm
existed, as it oddly seems to be missing the beginning slash. Edit: you mentioned they do exist, so it seems to be ignoring the //
instead of converting it to /
.
I'm closing this as I think the issue is understood and avoidable. A complete fix will come from https://github.com/conda/constructor/issues/284
FYI, while investigating the issue @chrisburr cited I found this:
https://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11
A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash.
To see this in action, try three slashes in the front, not just two—the normalization works as you would expect.
Issue:
I have just installed Root using Conda on Mac. The installation process yields no error. After installation, when I try to import ROOT in Python, it returns
And when I try to attach .root file using command
root Filename.root
, it returnsI have checked that the file /anaconda3/lib/libNetx_rdict.pcm and /anaconda3/lib/libTree_rdict.pcm do both exist.
Environment (
conda list
):Details about
conda
and system (conda info
):