Ask Your Question

Is there some import I need to do for defining variables?

asked 2015-05-01 09:50:24 +0200

Fusion809 gravatar image

I have been running Sage 6.6 through VirtualBox and whenever I define a variable I get an error, like for example (for a,b,c = var('a,b,c')):

File "<stdin>", line 1, in <module>
  File "", line 10, in <module>
    exec compile(u'open("","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YSxiLGMgPSB2YXIo4oCZYSxiLGPigJkpCnFlID0gKGEqeF4yICsgYip4ICsgYyA9PSAwKQpwcmludCBzb2x2ZShxZSwgeCk="),globals())+"\\n"); execfile(os.path.abspath(""))
  File "", line 1, in <module>

  File "/tmp/tmpAUEAbf/", line 3
    a,b,c = var(’a,b,c’)
SyntaxError: invalid syntax
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2015-05-01 11:21:41 +0200

eric_g gravatar image

It seems that the quotes delimiting the string 'a,b,c' are not correct (they appear to be slanted, while they should be vertical). They probably come from a cut-and-paste from e.g. a PDF document. Retry using your keyboard to type a,b,c = var('a,b,c').

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-05-01 09:50:24 +0200

Seen: 288 times

Last updated: May 01 '15