I noticed in trying this out that if a package is already installed, sage -c "install_package('package_name')"
raises a ValueError, which is definitely not the behavior I'd like. Is there a reason it does that? Perhaps simply printing that announcement would be sufficient? -Marshall On Nov 13, 4:30 pm, mhampton <hampto...@gmail.com> wrote: > OK, I have changed the spkg-install to use your solution. I have not > tested it yet though, since I am unsure how to un-install those > packages. > > -Marshall > > On Nov 13, 3:46 pm, William Stein <wst...@gmail.com> wrote: > > > Regarding: "so I attempt to install them with "sage -i" in the > > spkg-install script. The bad thing is I hard-code the package > > numbers, so that will break if they are updated." > > > Don't do that. Instead do this: > > > sage -c "install_package('package_name')" > > > without the version number. The "install_package" command in the Sage > > library automatically determined the most recent version of a package. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---