Open rbeezer opened 4 years ago
Just gave this a try with the following basic SymPy code:
from sympy import *
init_printing()
A = Matrix(3,3,[1,2,3,4,5,6,7,8,9])
A
This does not execute successfully for me. Perhaps you have to install libraries first? (Except it's browser-based, so not sure how that works.) The above code runs fine in a Sage cell. (Odd caveat: it runs fine in a Sage cell with the language set to Sage. It does not run if you set the language to Python.)
Could be because skulpt (and Sage, if you set the language to Python) expects Python 2.6. SymPy is Python 3, I think. I had good results this term running SymPy code in Sage Cell. And if I was careful about where I put Sage cells in PreTeXt, I could output to a Python3 Jupyter notebook and the code runs fine there as well.
skulpt can do Python 3, according to a demo I saw.
On Tue, 10 Dec 2019, sean-fitzpatrick wrote:
Could be because skulpt (and Sage, if you set the language to Python) expects Python 2.6. SymPy is Python 3, I think. I had good results this term running SymPy code in Sage Cell. And if I was careful about where I put Sage cells in PreTeXt, I could output to a Python3 Jupyter notebook and the code runs fine there as well.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, orunsubscribe.[AABTULATI2AAJ44TSP6SKKDQX7JEJA5CNFSM4JZCFNB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOOR PWSZGOEGQEM7I.gif]
I suspect SageCell has SymPy on the server, as part of generic Sage itself, so server-side.
Skulpt is running in a browser, client-side, so SymPy is not part of the "stuff" that Skulpt provides?
This would be more about learning to code with Python, not using any possible Python library.
On 12/10/19 10:08 AM, David W. Farmer wrote:
skulpt can do Python 3, according to a demo I saw.
On Tue, 10 Dec 2019, sean-fitzpatrick wrote:
Could be because skulpt (and Sage, if you set the language to Python) expects Python 2.6. SymPy is Python 3, I think. I had good results this term running SymPy code in Sage Cell. And if I was careful about where I put Sage cells in PreTeXt, I could output to a Python3 Jupyter notebook and the code runs fine there as well.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, orunsubscribe.[AABTULATI2AAJ44TSP6SKKDQX7JEJA5CNFSM4JZCFNB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOOR PWSZGOEGQEM7I.gif]
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rbeezer/mathbook/issues/1220?email_source=notifications&email_token=AAOLM4TXV77OROV2ADFJOYLQX7LKBA5CNFSM4JZCFNB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGQGK7Y#issuecomment-564159871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLM4XFDKQFDSDM3HEG3STQX7LKBANCNFSM4JZCFNBQ.
Got it. So this would be for a book on Python, not a book on linear algebra.
@bnmnetp (Brad Miller) and I got the Runestone ActiveCode object working in PTX output last night. That'd be Skulpt plus a whole lot more.
https://skulpt.org/
Perhaps related: #602