我想在Amazon Web Services(AWS)EC2实例上使用SageMath(使用Python)。在某些情况下,它运行良好,但在另一些情况下,当我尝试使用SageMath控制台界面时,出现以下错误:
Write-Host
在SageMath外壳环境中,我遇到了相同的错误:
help about_Redirection
与python相同的问题(在此实例上):
/opt/sagemath-8.8/local/bin/python: /opt/sagemath-8.8/local/bin/python: cannot execute binary file
/bin/bash: Exit 126.
问题:如何解决此问题?
如果有用,这是$ PATH命令提供的内容:
(sage-sh) Administrator@EC2AMAZ-P55TVFN:~$ sage
/opt/sagemath-8.8/local/bin/python: /opt/sagemath-8.8/local/bin/python: cannot execute binary file
现在,在我的SageMath运行良好的笔记本电脑上,$ PATH如下:
(sage-sh) Administrator@EC2AMAZ-7G39AK9:~$ python bash: /opt/sagemath-8.8/local/bin/python: cannot execute binary file: Exec format error.