conda-forge / root-feedstock

A conda-smithy repository for root.
BSD 3-Clause "New" or "Revised" License
28 stars 23 forks source link

TFile files cannot be found #53

Closed fxh90 closed 4 years ago

fxh90 commented 5 years ago

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

Error in <TFile::TFile>: file anaconda3/lib/libNet_rdict.pcm does not exist<br/>
Error in <TFile::TFile>: file anaconda3/lib/libTree_rdict.pcm does not exist

And when I try to attach .root file using command root Filename.root, it returns

root [0] 
Attaching file gain_calibration.root as _file0...
Error in <TFile::TFile>: file anaconda3/lib/libNet_rdict.pcm does not exist
(TFile *) 0x7f841c801d80

I have checked that the file /anaconda3/lib/libNetx_rdict.pcm and /anaconda3/lib/libTree_rdict.pcm do both exist.


Environment (conda list):

``` # packages in environment at //anaconda3: # # Name Version Build Channel _anaconda_depends 2019.03 py37_0 _ipyw_jlab_nb_ext_conf 0.1.0 py37_0 afterimage 1.21 h044d061_1002 conda-forge alabaster 0.7.12 py_0 conda-forge anaconda custom py37_1 anaconda-client 1.7.2 py_0 conda-forge anaconda-navigator 1.9.7 py37_0 anaconda-project 0.8.3 py_0 conda-forge appnope 0.1.0 py37_1000 conda-forge appscript 1.1.0 py37h01d97ff_0 conda-forge asn1crypto 0.24.0 py37_1003 conda-forge astroid 2.2.5 py37_0 conda-forge astropy 3.2.1 py37h01d97ff_0 conda-forge atomicwrites 1.3.0 py_0 conda-forge attrs 19.1.0 py_0 conda-forge babel 2.7.0 py_0 conda-forge backcall 0.1.0 py_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.5 py_1 conda-forge backports.os 0.1.1 py37_1001 conda-forge backports.shutil_get_terminal_size 1.0.0 py_3 conda-forge backports.tempfile 1.0 py_0 conda-forge backports.weakref 1.0.post1 py37_1000 conda-forge beautifulsoup4 4.8.0 py37_0 conda-forge binutils 1.0.1 0 conda-forge bitarray 1.0.1 py37h01d97ff_0 conda-forge bkcharts 0.2 py37_0 blas 2.12 openblas conda-forge bleach 3.1.0 py_0 conda-forge blosc 1.17.0 h6de7cb9_1 conda-forge bokeh 1.3.4 py37_0 conda-forge boto 2.49.0 py_0 conda-forge bottleneck 1.2.1 py37h917ab60_1001 conda-forge bzip2 1.0.8 h01d97ff_0 conda-forge c-compiler 1.0.1 h1de35cc_0 conda-forge ca-certificates 2019.6.16 hecc5488_0 conda-forge cairo 1.16.0 h0ab9d94_1001 conda-forge cctools 895 1 conda-forge certifi 2019.6.16 py37_1 conda-forge cffi 1.12.3 py37hccf1714_0 conda-forge cfitsio 3.470 h389770f_2 conda-forge chardet 3.0.4 py37_1003 conda-forge clang 8.0.1 h770b8ee_0 conda-forge clang_osx-64 8.0.1 h22b1bf0_18 conda-forge clangxx 8.0.1 0 conda-forge clangxx_osx-64 8.0.1 h22b1bf0_18 conda-forge click 7.0 py_0 conda-forge cloudpickle 1.2.1 py_0 conda-forge clyent 1.2.2 py_1 conda-forge colorama 0.4.1 py_0 conda-forge compiler-rt 8.0.1 hef50cfd_0 conda-forge compilers 1.0.1 0 conda-forge conda 4.7.11 py37_0 conda-forge conda-build 3.18.8 py37_0 conda-env 2.6.0 1 conda-package-handling 1.4.1 py37_0 conda-forge conda-verify 3.4.2 py_1 contextlib2 0.5.5 py_2 conda-forge cryptography 2.7 py37h212c5bf_0 conda-forge curl 7.65.3 h22ea746_0 conda-forge cxx-compiler 1.0.1 h04f5b5a_0 conda-forge cycler 0.10.0 py_1 conda-forge cython 0.29.13 py37h6de7cb9_0 conda-forge cytoolz 0.10.0 py37h01d97ff_0 conda-forge dask 2.3.0 py_0 conda-forge dask-core 2.3.0 py_0 conda-forge davix 0.7.5 h7232a33_0 conda-forge dbus 1.13.6 h2f22bb5_0 conda-forge decorator 4.4.0 py_0 conda-forge defusedxml 0.5.0 py_1 conda-forge distributed 2.3.2 py_1 conda-forge docutils 0.15.2 py37_0 conda-forge entrypoints 0.3 py37_1000 conda-forge et_xmlfile 1.0.1 py_1001 conda-forge expat 2.2.5 h6de7cb9_1003 conda-forge fastcache 1.1.0 py37h01d97ff_0 conda-forge fftw 3.3.8 nompi_h5c49c53_1109 conda-forge filelock 3.0.10 py_0 conda-forge flask 1.1.1 py_1 conda-forge fontconfig 2.13.1 h1027ab8_1000 conda-forge fortran-compiler 1.0.1 h4f947d3_0 conda-forge freetype 2.10.0 h24853df_1 conda-forge fribidi 1.0.5 h01d97ff_1002 conda-forge fsspec 0.4.4 py_0 conda-forge future 0.17.1 py37_1000 conda-forge gdk-pixbuf 2.36.12 h284f8de_1003 conda-forge get_terminal_size 1.0.0 h7520d66_0 gettext 0.19.8.1 h46ab8bc_1002 conda-forge gevent 1.4.0 py37h470a237_0 conda-forge gfortran_osx-64 4.8.5 h22b1bf0_8 conda-forge giflib 5.1.7 h01d97ff_1 conda-forge glew 2.0.0 h0a44026_1002 conda-forge glib 2.58.3 h9d45998_1002 conda-forge glob2 0.7 py_0 conda-forge gmp 6.1.2 h0a44026_1000 conda-forge gmpy2 2.1.0b1 py37h1744cca_0 conda-forge gobject-introspection 1.58.2 py37hd1819d1_1002 conda-forge graphite2 1.3.13 h2098e52_1000 conda-forge greenlet 0.4.15 py37h01d97ff_0 conda-forge gsl 2.4 ha2d443c_1006 conda-forge h5py 2.9.0 nompi_py37h6248fd5_1104 conda-forge harfbuzz 2.4.0 h92b87b8_1 conda-forge hdf5 1.10.5 nompi_h0cbb7df_1103 conda-forge heapdict 1.0.0 py37_1000 conda-forge html5lib 1.0.1 py_0 conda-forge icu 58.2 h0a44026_1000 conda-forge idna 2.8 py37_1000 conda-forge imageio 2.5.0 py37_0 conda-forge imagesize 1.1.0 py_0 conda-forge importlib_metadata 0.20 py37_0 conda-forge intel-openmp 2019.4 233 ipykernel 5.1.2 py37h5ca1d4c_0 conda-forge ipyparallel 6.2.4 py37_0 conda-forge ipython 7.8.0 py37h5ca1d4c_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.5.1 py_0 conda-forge isort 4.3.21 py37_0 conda-forge itsdangerous 1.1.0 py_0 conda-forge jbig 2.1 h1de35cc_2001 conda-forge jdcal 1.4.1 py_0 conda-forge jedi 0.15.1 py37_0 conda-forge jinja2 2.10.1 py_0 conda-forge joblib 0.13.2 py_0 conda-forge jpeg 9c h1de35cc_1001 conda-forge json5 0.8.5 py_0 conda-forge jsonschema 3.0.2 py37_0 conda-forge jupyter 1.0.0 py_2 conda-forge jupyter_client 5.3.1 py_0 conda-forge jupyter_console 6.0.0 py_0 conda-forge jupyter_core 4.4.0 py_0 conda-forge jupyterlab 1.1.1 py_0 conda-forge jupyterlab_server 1.0.6 py_0 conda-forge keyring 19.1.0 py37_0 conda-forge kiwisolver 1.1.0 py37h770b8ee_0 conda-forge krb5 1.16.3 hcfa6398_1001 conda-forge lazy-object-proxy 1.4.2 py37h01d97ff_0 conda-forge ld64 274.2 h7c2db76_0 conda-forge libarchive 3.3.3 h5c473cc_1006 conda-forge libblas 3.8.0 12_openblas conda-forge libcblas 3.8.0 12_openblas conda-forge libcroco 0.6.13 hc484408_0 conda-forge libcurl 7.65.3 h16faf7d_0 conda-forge libcxx 8.0.1 0 conda-forge libcxxabi 8.0.1 0 conda-forge libedit 3.1.20170329 hcfe32e1_1001 conda-forge libffi 3.2.1 h6de7cb9_1006 conda-forge libgfortran 3.0.1 0 conda-forge libiconv 1.15 h01d97ff_1005 conda-forge liblapack 3.8.0 12_openblas conda-forge liblapacke 3.8.0 12_openblas conda-forge liblief 0.9.0 h2a1bed3_1 conda-forge libllvm8 8.0.1 h770b8ee_0 conda-forge libopenblas 0.3.7 hd44dcd8_1 conda-forge libpng 1.6.37 h2573ce8_0 conda-forge librsvg 2.44.15 h90c2430_0 conda-forge libsodium 1.0.17 h01d97ff_0 conda-forge libssh2 1.8.2 hcdc9a53_2 conda-forge libtiff 4.0.10 hd08fb8f_1003 conda-forge libxml2 2.9.9 hd80cff7_2 conda-forge libxslt 1.1.32 h1e79283_1003 conda-forge llvm-lto-tapi 4.0.1 h6701bc3_0 conda-forge llvm-openmp 8.0.1 h770b8ee_0 conda-forge llvmlite 0.29.0 py37h3fea490_1 conda-forge locket 0.2.0 py_2 conda-forge lxml 4.4.1 py37h08abf6f_0 conda-forge lz4 2.1.9 py37h9608888_0 conda-forge lz4-c 1.8.3 h6de7cb9_1001 conda-forge lzo 2.10 h1de35cc_1000 conda-forge markupsafe 1.1.1 py37h1de35cc_0 conda-forge matplotlib 3.1.1 py37_1 conda-forge matplotlib-base 3.1.1 py37h3a684a6_1 conda-forge mccabe 0.6.1 py_1 conda-forge metakernel 0.24.2 py_1 conda-forge mistune 0.8.4 py37h1de35cc_1000 conda-forge mkl 2019.4 233 mkl-service 2.3.0 py37h01d97ff_0 conda-forge mkl_fft 1.0.14 py37h01d97ff_1 conda-forge mkl_random 1.0.4 py37h051e8ed_0 conda-forge mock 3.0.5 py37_0 conda-forge more-itertools 7.2.0 py_0 conda-forge mpc 1.1.0 h3aece09_1006 conda-forge mpfr 4.0.2 h0a95893_0 conda-forge mpmath 1.1.0 py_0 conda-forge msgpack-python 0.6.1 py37h04f5b5a_0 conda-forge multipledispatch 0.6.0 py_0 conda-forge navigator-updater 0.2.1 py37_0 nbconvert 5.6.0 py37_1 conda-forge nbformat 4.4.0 py_1 conda-forge ncurses 6.1 h0a44026_1002 conda-forge networkx 2.3 py_0 conda-forge nltk 3.4.4 py_0 conda-forge nose 1.3.7 py37_1002 conda-forge notebook 6.0.1 py37_0 conda-forge numba 0.45.1 py37h86efe34_0 conda-forge numexpr 2.7.0 py37h86efe34_0 conda-forge numpy 1.16.4 py37h926163e_0 numpy-base 1.16.4 py37ha711998_0 numpydoc 0.9.1 py_0 conda-forge olefile 0.46 py_0 conda-forge openpyxl 2.6.3 py_0 conda-forge openssl 1.1.1c h01d97ff_0 conda-forge packaging 19.0 py_0 conda-forge pandas 0.25.1 py37h86efe34_0 conda-forge pandoc 2.7.3 0 conda-forge pandocfilters 1.4.2 py_1 conda-forge pango 1.42.4 h6691c8e_1 conda-forge parso 0.5.1 py_0 conda-forge partd 1.0.0 py_0 conda-forge path.py 12.0.1 py_0 conda-forge pathlib2 2.3.4 py37_0 conda-forge patsy 0.5.1 py_0 conda-forge pcre 8.41 h0a44026_1003 conda-forge pep8 1.7.1 py_0 conda-forge pexpect 4.7.0 py37_0 conda-forge pickleshare 0.7.5 py37_1000 conda-forge pillow 6.1.0 py37h75ffe9a_1 conda-forge pip 19.2.3 py37_0 conda-forge pixman 0.38.0 h01d97ff_1003 conda-forge pkginfo 1.5.0.1 py_0 conda-forge pluggy 0.12.0 py_0 conda-forge ply 3.11 py_1 conda-forge prometheus_client 0.7.1 py_0 conda-forge prompt_toolkit 2.0.9 py_0 conda-forge psutil 5.6.3 py37h01d97ff_0 conda-forge ptyprocess 0.6.0 py_1001 conda-forge py 1.8.0 py_0 conda-forge py-lief 0.9.0 py37h6d6d4d2_1 conda-forge pycodestyle 2.5.0 py_0 conda-forge pycosat 0.6.3 py37h1de35cc_1001 conda-forge pycparser 2.19 py37_1 conda-forge pycrypto 2.6.1 py37h01d97ff_1003 conda-forge pycurl 7.43.0.2 py37ha206b4a_1 conda-forge pyflakes 2.1.1 py_0 conda-forge pygments 2.4.2 py_0 conda-forge pylint 2.3.1 py37_0 conda-forge pyodbc 4.0.27 py37h6de7cb9_0 conda-forge pyopenssl 19.0.0 py37_0 conda-forge pyparsing 2.4.2 py_0 conda-forge pyqt 5.9.2 py37h2a560b1_2 conda-forge pyrsistent 0.15.4 py37h01d97ff_0 conda-forge pysocks 1.7.0 py37_0 conda-forge pytables 3.5.2 py37hd39446c_2 conda-forge pytest 5.1.2 py37_0 conda-forge pytest-arraydiff 0.3 py_0 conda-forge pytest-astropy 0.5.0 py_0 conda-forge pytest-doctestplus 0.3.0 py_1 conda-forge pytest-openfiles 0.4.0 py_0 conda-forge pytest-remotedata 0.3.1 py_0 conda-forge pythia8 8.240 py37h6de7cb9_2 conda-forge python 3.7.3 h359304d_0 python-dateutil 2.8.0 py_0 conda-forge python-libarchive-c 2.8 py37_1004 conda-forge python.app 2 py37_9 pytz 2019.2 py_0 conda-forge pywavelets 1.0.3 py37h1e5eb4f_1 conda-forge pyyaml 5.1.2 py37h01d97ff_0 conda-forge pyzmq 18.0.2 py37hee98d25_2 conda-forge qt 5.9.7 h93ee506_2 conda-forge qtawesome 0.6.0 py_0 conda-forge qtconsole 4.5.5 py_0 conda-forge qtpy 1.9.0 py_0 conda-forge readline 7.0 hcfe32e1_1001 conda-forge requests 2.22.0 py37_1 conda-forge root 6.16.00 py37h82bc3df_12 conda-forge root-numpy 4.8.0 pypi_0 pypi root-pandas 0.7.0 pypi_0 pypi rope 0.14.0 py_0 conda-forge ruamel_yaml 0.15.71 py37h1de35cc_1000 conda-forge scikit-image 0.15.0 py37h86efe34_2 conda-forge scikit-learn 0.21.3 py37hd4ffd6c_0 conda-forge scipy 1.3.1 py37hab3da7d_2 conda-forge seaborn 0.9.0 py_1 conda-forge send2trash 1.5.0 py_0 conda-forge setuptools 41.2.0 py37_0 conda-forge simplegeneric 0.8.1 py_1 conda-forge singledispatch 3.4.0.3 py37_1000 conda-forge sip 4.19.8 py37h0a44026_1000 conda-forge six 1.12.0 py37_1000 conda-forge snappy 1.1.7 h6de7cb9_1002 conda-forge snowballstemmer 1.9.0 py_0 conda-forge sortedcollections 1.1.2 py_0 conda-forge sortedcontainers 2.1.0 py_0 conda-forge soupsieve 1.9.3 py37_0 conda-forge sphinx 2.2.0 py_0 conda-forge sphinxcontrib 1.0 py37_1 sphinxcontrib-applehelp 1.0.1 py_0 conda-forge sphinxcontrib-devhelp 1.0.1 py_0 conda-forge sphinxcontrib-htmlhelp 1.0.2 py_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.2 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.1 py_0 conda-forge sphinxcontrib-websupport 1.1.2 py_0 conda-forge spyder 3.3.6 py37_0 conda-forge spyder-kernels 0.5.1 py37_0 conda-forge sqlalchemy 1.3.8 py37h01d97ff_0 conda-forge sqlite 3.28.0 h9721f7c_0 conda-forge statsmodels 0.10.1 py37heacc8b8_0 conda-forge sympy 1.4 py37_0 conda-forge tbb 2019.8 h770b8ee_0 conda-forge tbb-devel 2019.8 h770b8ee_0 conda-forge tblib 1.4.0 py_0 conda-forge terminado 0.8.2 py37_0 conda-forge testpath 0.4.2 py_1001 conda-forge tk 8.6.9 h2573ce8_1002 conda-forge toolz 0.10.0 py_0 conda-forge tornado 6.0.3 py37h01d97ff_0 conda-forge tqdm 4.35.0 py_0 conda-forge traitlets 4.3.2 py37_1000 conda-forge unicodecsv 0.14.1 py_1 conda-forge unixodbc 2.3.7 hea208f4_1000 conda-forge urllib3 1.25.3 py37_0 conda-forge vdt 0.4.3 h6de7cb9_0 conda-forge wcwidth 0.1.7 py_1 conda-forge webencodings 0.5.1 py_1 conda-forge werkzeug 0.15.5 py_0 conda-forge wheel 0.33.6 py37_0 conda-forge widgetsnbextension 3.5.1 py37_0 conda-forge wrapt 1.11.2 py37h01d97ff_0 conda-forge wurlitzer 1.0.3 py37_0 conda-forge xlrd 1.2.0 py_0 conda-forge xlsxwriter 1.2.0 py_0 conda-forge xlwings 0.15.10 py37_0 conda-forge xlwt 1.3.0 py_1 conda-forge xrootd 4.9.1 py37hf280583_0 conda-forge xz 5.2.4 h1de35cc_1001 conda-forge yaml 0.1.7 h1de35cc_1001 conda-forge zeromq 4.3.2 h6de7cb9_2 conda-forge zict 1.0.0 py_0 conda-forge zipp 0.6.0 py_0 conda-forge zlib 1.2.11 h01d97ff_1005 conda-forge zstd 1.4.0 ha9f0a20_0 conda-forge ```


Details about conda and system ( conda info ):

``` active environment : base active env location : //anaconda3 shell level : 1 user config file : /Users/fzh/.condarc populated config files : /Users/fzh/.condarc conda version : 4.7.11 conda-build version : 3.18.8 python version : 3.7.3.final.0 virtual packages : base environment : //anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : //anaconda3/pkgs /Users/fzh/.conda/pkgs envs directories : //anaconda3/envs /Users/fzh/.conda/envs platform : osx-64 user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.3 Darwin/18.7.0 OSX/10.14.6 UID:GID : 501:20 netrc file : None offline mode : False ```
chrisburr commented 5 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
fxh90 commented 5 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

Thank you for your reply. The out of of env is as below:

``` AS=//anaconda3/bin/x86_64-apple-darwin13.4.0-as LDFLAGS=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs AR=//anaconda3/bin/x86_64-apple-darwin13.4.0-ar CODESIGN_ALLOCATE=//anaconda3/bin/x86_64-apple-darwin13.4.0-codesign_allocate TERM_PROGRAM=Apple_Terminal HOST=x86_64-apple-darwin13.4.0 TERM=xterm-256color SHELL=/bin/bash NM=//anaconda3/bin/x86_64-apple-darwin13.4.0-nm CPPFLAGS=-D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 TMPDIR=/var/folders/yn/htnxmchd047bgtjfcgzwypk40000gn/T/ PAGESTUFF=//anaconda3/bin/x86_64-apple-darwin13.4.0-pagestuff CONDA_SHLVL=1 Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.uZ0QHn0huu/Render LIPO=//anaconda3/bin/x86_64-apple-darwin13.4.0-lipo CONDA_PROMPT_MODIFIER=(base) TERM_PROGRAM_VERSION=421.2 SIZE=//anaconda3/bin/x86_64-apple-darwin13.4.0-size NMEDIT=//anaconda3/bin/x86_64-apple-darwin13.4.0-nmedit TERM_SESSION_ID=1DB23693-F6B4-4735-A7E0-7798FCCC260A INSTALL_NAME_TOOL=//anaconda3/bin/x86_64-apple-darwin13.4.0-install_name_tool SEGEDIT=//anaconda3/bin/x86_64-apple-darwin13.4.0-segedit GFORTRAN=//anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran SEG_HACK=//anaconda3/bin/x86_64-apple-darwin13.4.0-seg_hack USER=fzh CLANGXX=//anaconda3/bin/x86_64-apple-darwin13.4.0-clang++ LIBTOOL=//anaconda3/bin/x86_64-apple-darwin13.4.0-libtool CONDA_BACKUP_HOST=x86_64-apple-darwin13.4.0 CONDA_EXE=//anaconda3/bin/conda OTOOL=//anaconda3/bin/x86_64-apple-darwin13.4.0-otool SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.wgWBBUo6wq/Listeners DEBUG_FORTRANFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 CONDA_BUILD_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk STRINGS=//anaconda3/bin/x86_64-apple-darwin13.4.0-strings _CE_CONDA= CHECKSYMS=//anaconda3/bin/x86_64-apple-darwin13.4.0-checksyms PATH=//anaconda3/bin://anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin DEBUG_CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -Og -g -Wall -Wextra LD=//anaconda3/bin/x86_64-apple-darwin13.4.0-ld CONDA_PREFIX=//anaconda3 PYTHIA8=//anaconda3 F90=//anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran PWD=/Users/fzh/TUHEP/20L/FengAnalysis STRIP=//anaconda3/bin/x86_64-apple-darwin13.4.0-strip F95=//anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran LANG=en_GB.UTF-8 DEBUG_FFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments XPC_FLAGS=0x0 F77=//anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran REDO_PREBINDING=//anaconda3/bin/x86_64-apple-darwin13.4.0-redo_prebinding CXX=x86_64-apple-darwin13.4.0-clang++ CLANG=//anaconda3/bin/x86_64-apple-darwin13.4.0-clang ROOTSYS=//anaconda3 _CE_M= XPC_SERVICE_NAME=0 HOME=/Users/fzh SHLVL=1 FORTRANFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe _CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_apple_darwin13_4_0 FC=//anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran INDR=//anaconda3/bin/x86_64-apple-darwin13.4.0-indr CONDA_PYTHON_EXE=//anaconda3/bin/python LOGNAME=fzh CONDA_DEFAULT_ENV=base DEBUG_CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -Og -g -Wall -Wextra RANLIB=//anaconda3/bin/x86_64-apple-darwin13.4.0-ranlib PYTHIA8DATA=//anaconda3/share/Pythia8/xmldoc PYTHIA8_DIR=//anaconda3 CC=x86_64-apple-darwin13.4.0-clang SEG_ADDR_TABLE=//anaconda3/bin/x86_64-apple-darwin13.4.0-seg_addr_table LDFLAGS_LD=-pie -headerpad_max_install_names -dead_strip_dylibs SECURITYSESSIONID=186a8 FFLAGS=-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe _=/usr/bin/env ```
fxh90 commented 5 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

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
fxh90 commented 5 years ago

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.

henryiii commented 5 years ago

Is this solved?

fxh90 commented 5 years ago

No, unfortunately.

oshadura commented 5 years ago

@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?

chrisburr commented 5 years ago

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

henryiii commented 5 years ago

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 /.

chrisburr commented 4 years ago

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

mcg1969 commented 4 years ago

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.