我正在尝试使用sage -i plantri安装一个Sage软件包(即plantri)。我收到消息:sage-run收到未知选项:-i。
我已经通过sage -sh打开了一个sage外壳,并重复了相同的命令(sage -i plantri)。收到相同的消息。我正在使用SageMath版本8.1,发布日期:2017-12-07。
我已经尝试通过ubuntu软件包存储库使用sage安装,并进行了手动安装(自己下载并编译sage)。如何在Sage中安装其他软件包?
sage -i
命令仅适用于从源代码编译的Sage。
如果您已经从Ubuntu软件包存储库中安装了Sage,并从源代码进行编译,您路径中的sage
是可能是Ubuntu软件包存储库中的一个。
要为从源代码编译的Sage安装plantri
,使用其完整路径或导航至其位置,然后使用./sage
。如果您的Sage安装在~/SageMath
中这两个解决方案看起来像:
两个
~/SageMath/sage -i plantri # tell that Sage to install plantri
或
cd ~/SageMath # assuming this is where Sage is installed
./sage -i plantri # tell this Sage here to install plantri