AttributeError on Oneiric Ocelot
Hello,
I get the message "AttributeError: 'module' object has no attribute 'core'" when i try to define a vector using "vector" command like v = vector([1,2]). Does anyone knows what causes this and how can i fix it?
Edit: this is on Ubuntu 11.10 with an older version binary.
Can you give a complete Sage session? I feel like you must have done something else. I do not get this error.
Two questions: (1) what version of Sage are you running?, and (2) could you start Sage up from the command line, type "vector([1,2])" as the first command, and post the full traceback? [The reason for the latter is because one possibility is that a too-wide import during a session replaced something unexpectedly.]
Hi. here is what i get when i start a fresh session :---------------------------------------------------------------------- | Sage Version 4.7.2, Release Date: 2011-10-29 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: v=vector([1,2]) --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /home/Desktop/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/<ipython console=""> in <module>() /home/Desktop/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/local/lib/python2.6/site-packages/sage/modules/free_module_element.so in sage.modules.free_module_eleme
so in sage.modules.free_module_element.vector (sage/modules/free_module_element.c:3719)()/home/Desktop/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/local/lib/python2.6/site-packages/numpy/__init__.pyc in <module>() 134 return loader(*packages, **options) 135 --> 136 import add_newdocs 137 __all__ = ['add_newdocs'] 138 /home/Desktop/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/local/lib/python2.6/site-packages/numpy/add_newdocs.py in <module>() 7 # core/fromnumeric.py, core/defmatrix.py up-to-date. 8 ----> 9 from numpy.lib import add_newdoc 10 11 ###############################################################################
and it keeps going like that. I think it is because i did not have all the packages. I am downloading the packages now and i will see how it works. Thanks a lot for the responses.
You shouldn't have to download any other packages. Is your platform actually a 32 bit Ubuntu 10.04?
I must have missed the last comment even though i kept looking couple of days. I just saw it. Now i am back to working on this. I uninstalled got a fresh copy of sage and I am still having the same issue. I am using Ubuntu-11.10. I downloaded (sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux.tar.lzma). And here is what i get when I use the vectors.
sage: v=vector([1,2]) --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /home/ogularslan/Desktop/sage/<ipython console=""> in <module>() /home/ogularslan/Desktop/sage/local/lib/python2.6/site-packages/sage/modules/free_module_element.so in sage.modules.free_module_element.vector (sage/modules/free_module_element.c:3719)() /home/ogularslan/Desktop/sage/local/lib/python2.6/site-packages/numpy/__init__.pyc in <module>() 134 return loader(*packages, **options) 135 --> 136 import add_newdocs 137 __all__ = ['add_newdocs'] 138
There is a long list of error messages that i did not post. I can post them too if necessary.
We've had problems with 11.10 in general, though with compiling - I don't know if anyone has had issues with binaries from older Ubuntus. If no one else answers here, you should email sage-support@googlegroups.com, which is a little easier for this sort of question.
ok thanks. once again
It turned out that Ubuntu 11.10 did not have some fortran package. With a help of a friend we installed gfortran and things seem fine for now.
If you read http://www.sagemath.org/doc/installation/source.html it says that fortran is needed for Sage to build. I'm a bit surprised it's needed to *run*, since lots of people without Fortran on Mac use binaries created using Fortran...
my friend pointed out that may be it gave some errors while it is building but since it kept rolling i didn't notice it. But some part was definitely working fine. For example i could define a finite field and a projective space over it. I guess previous versions of Ubuntu had fortran by default but not this one.