ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 27 Jan 2011 22:52:30 +0100"Type Error" when trying to install a packagehttps://ask.sagemath.org/question/7903/type-error-when-trying-to-install-a-package/I'm trying to install the macaulay2 package and I'm getting an error which i can't seem to figure out. Please excuse my newbitude.
------------
sage: install_package(macaulay2)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/opt/sage-4.6.1-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/data/extcode/macaulay2/user/<ipython console> in <module>()
/opt/sage-4.6.1-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/package.pyc in install_package(package, force)
129 S,O,E = [], [], []
130 S.extend([P for P in standard_packages()[1] if P.startswith(package)])
--> 131 O.extend([P for P in optional_packages()[1] if P.startswith(package)])
132 E.extend([P for P in experimental_packages()[1] if P.startswith(package)])
133 L = S+O+E
TypeError: expected a character buffer object
-------------
What does this mean? What do I need to do to fix it? Thu, 27 Jan 2011 22:19:23 +0100https://ask.sagemath.org/question/7903/type-error-when-trying-to-install-a-package/Comment by Evgeny for <p>I'm trying to install the macaulay2 package and I'm getting an error which i can't seem to figure out. Please excuse my newbitude.</p>
<hr/>
<h2>sage: install_package(macaulay2)</h2>
<p>TypeError Traceback (most recent call last)</p>
<p>/opt/sage-4.6.1-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/data/extcode/macaulay2/user/<ipython console=""> in <module>()</p>
<p>/opt/sage-4.6.1-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/package.pyc in install_package(package, force)
129 S,O,E = [], [], []
130 S.extend([P for P in standard_packages()[1] if P.startswith(package)])
--> 131 O.extend([P for P in optional_packages()[1] if P.startswith(package)])
132 E.extend([P for P in experimental_packages()[1] if P.startswith(package)])
133 L = S+O+E</p>
<p>TypeError: expected a character buffer object</p>
<hr/>
<p>What does this mean? What do I need to do to fix it? </p>
https://ask.sagemath.org/question/7903/type-error-when-trying-to-install-a-package/?comment=22231#post-id-22231hey, try to use code formatting button in the editor - it has numbers written on it, all posts can be edited.Thu, 27 Jan 2011 22:23:41 +0100https://ask.sagemath.org/question/7903/type-error-when-trying-to-install-a-package/?comment=22231#post-id-22231Answer by tdupu10000 for <p>I'm trying to install the macaulay2 package and I'm getting an error which i can't seem to figure out. Please excuse my newbitude.</p>
<hr/>
<h2>sage: install_package(macaulay2)</h2>
<p>TypeError Traceback (most recent call last)</p>
<p>/opt/sage-4.6.1-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/data/extcode/macaulay2/user/<ipython console=""> in <module>()</p>
<p>/opt/sage-4.6.1-linux-64bit-ubuntu_10.04.1_lts-x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/package.pyc in install_package(package, force)
129 S,O,E = [], [], []
130 S.extend([P for P in standard_packages()[1] if P.startswith(package)])
--> 131 O.extend([P for P in optional_packages()[1] if P.startswith(package)])
132 E.extend([P for P in experimental_packages()[1] if P.startswith(package)])
133 L = S+O+E</p>
<p>TypeError: expected a character buffer object</p>
<hr/>
<p>What does this mean? What do I need to do to fix it? </p>
https://ask.sagemath.org/question/7903/type-error-when-trying-to-install-a-package/?answer=12021#post-id-12021I'm retarded again. The correct input was the string
>'macaulay2'
rather than just
> macaulay2
so the correct command is actually
> install_package('macaulay2')
Thu, 27 Jan 2011 22:52:30 +0100https://ask.sagemath.org/question/7903/type-error-when-trying-to-install-a-package/?answer=12021#post-id-12021