在mac OS El Capitan上进行持续集成的根安装

2024-10-01 00:22:05 发布

您现在位置:Python中文网/ 问答频道 /正文

在mac OS El Capitan上使用brew进行根安装后,使用travis文件中的以下代码:

brew update > /dev/null;
brew install xz;
brew install homebrew/science/root;
source $(brew --prefix root)/libexec/thisroot.sh;

出现以下错误(内部版本https://travis-ci.org/yandex/rep/jobs/168399771):

/usr/local/opt/root/libexec/thisroot.sh: line 45: shell_session_update: command not found

这将导致在python中导入根目录时出错:

python -c 'import ROOT'
Fatal Python error: PyThreadState_Get: no current thread

错误的来源,也许是rvm。下面的添加方法(firstsecond

echo 'shell_session_update' > $HOME/.bash_logout; 

或者

echo 'shell_session_update() { :; }' > $HOME/.direnvrc; 

两者都不起作用。你知道吗

你有什么办法解决这个问题吗?提前谢谢。你知道吗


Tags: installechotravishomeossessionmacsh