英文:
libxml2_activate.sh:export:12: not valid in this context: XML_CATALOG_FILES+ after Pytorch installation attempt on MacOS via Anaconda
问题
我最初在我的MacOS上尝试安装Pytorch时运行了以下命令,
conda install pytorch torchvision -c pytorch
安装似乎已成功完成,但最后出现了这个消息
/opt/homebrew/Caskroom/miniforge/base/etc/conda/activate.d/libxml2_activate.sh:export:12: not valid in this context: XML_CATALOG_FILES+
这也出现在我打开的每个终端窗口的开头
我不太确定这是什么意思。我尝试验证Pytorch是否能正常工作,但每次运行官方网站上提供的测试命令时,它都无法识别输入。我还尝试再次运行安装命令,但它提到所有请求的软件包已安装。非常感谢任何帮助,谢谢您阅读。
英文:
I had initially ran the following command on my MacOS in an attempt to install Pytorch,
conda install pytorch torchvision -c pytorch
The installation appeared to complete successfully, but at the end this appeared
/opt/homebrew/Caskroom/miniforge/base/etc/conda/activate.d/libxml2_activate.sh:export:12: not valid in this context: XML_CATALOG_FILES+
This also appears at the start of any terminal window i open
And I'm not exactly sure what this means. I've tried to verify if Pytorch would work but each time I run the test command featured at the official website, it never recognises the input. I've also tried running the installation command again, it mentions that all requested packages already installed. Any help would be greatly appreciated, thank you for reading.
答案1
得分: 0
I had the exact same issue after running conda update --all
. I believe I solved it going to my libxml2_activate.sh
file and replacing line 12 (the last one):
export XML_CATALOG_FILES+="${conda_catalog_files}"
with
XML_CATALOG_FILES+="${conda_catalog_files}"
export XML_CATALOG_FILES
I am by no means an expert in bash files, but based on this gnu docs, I believe what I did is valid. Second opinions are appreciated.
英文:
I had the exact same issue after running conda update --all
. I believe I solved it going to my libxml2_activate.sh
file and replacing line 12 (the last one):
export XML_CATALOG_FILES+="${conda_catalog_files}"
with
XML_CATALOG_FILES+="${conda_catalog_files}"
export XML_CATALOG_FILES
I am by no means an expert in bash files, but based on this gnu docs, I believe what I did is valid. Second opinions are appreciated.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论