jlapeyre / Symata.jl

language for symbolic mathematics
Other
175 stars 15 forks source link

Installation Failed #200

Closed mgemath closed 3 years ago

mgemath commented 3 years ago

First install of Symata installs all dependencies except one.

After I call using Symata, I got: WARNING: could not import Base.Test into Symata ERROR: LoadError: LoadError: MethodError: Cannot convert an object of type Expr to an object of type Symbol

See the image attached for full display. I have no idea why this happens. I got the same error with Julia 1.6.0 both on Windows 10 and Linux. Symata error

jlapeyre commented 3 years ago

Thanks. Which version of Symata are you using? v0.4.9 ?

EDIT: Symata v0.4.9 loads for me with Julia 1.6.0-beta1 as well as Julia 1.7.0-DEV.961 under linux

mgemath commented 3 years ago

I am using the last one, 0.4.5 I just updated to Julia 1.6.1. Same problem :(((

jlapeyre commented 3 years ago

Symata v0.4.5 is from September 2018, it won't work with any recent versions of Julia and sympy.

Symata uses parts of Julia that are not in the public API. So as Julia is developed, Symata breaks. Also changes in sympy cause Symata to break.

Are you able to install Symata v0.4.9 ?

mgemath commented 3 years ago

Very clear, thank you.

I just used Pkg.add("Symata") and that is what I got.

How can I upgrade to version 0.4.9? I do not know.....

jlapeyre commented 3 years ago

Oh, I see, github-actions did not "release" v0.4.9, even though I uploaded and tagged that version. So you should be getting v0.4.8, but that will be broken with recent versions of Julia. I have to find out how to reactivate github-actions....

jlapeyre commented 3 years ago

This worked for me:

Pkg.add(name="Symata", rev="master")

I also re-enabled the tagbot which means v0.4.9 should be registered sometime soon as the official latest version.

mgemath commented 3 years ago

I did that and it installed 0.4.9 correctly. Unfortunately, after "using Symata" it happens nothing. It just does not precompile the module and it returns to Julia.

jlapeyre commented 3 years ago

Hmm, this probably means its working.

From the Julia prompt, you have to hit '=' key to enter Symata mode.

Then you can try

symata 2> 1 + 1
Out(2) = 2

symata 3> Cos(Pi/2)
Out(3) = 0
mgemath commented 3 years ago

Thank you!!! Now it works!!! Problem solved.

This may sound a bit out of context, but I still get many errors. For example, in a Jupyter notebook, after "using Symata" almost every line of code I execute returns: "UndefVarError: print_quoted_literal not defined".

In Pluto I do not have such an error, but for example "Cos(Pi/2)" returns "1".

In REPL mode, the code goes well, except that I tried "Sum[x,[x,1,4]]" and I got an error. Maybe I do not use Sum[...] properly, but I could not found a working example of that function anywhere.

jlapeyre commented 3 years ago

Glad to hear you are having some success.

You can use "?"

symata 2> ? Sum
  Sum(expr, [x,a,b])

  sums over x from a to b.

 Attributes(Sum) = [HoldAll,Protected,ReadProtected]

symata 2> Sum(x, [x,1,4])
Out(2) = 10
jlapeyre commented 3 years ago

For example, in a Jupyter notebook, after "using Symata" almost every line of code I execute returns: "UndefVarError: print_quoted_literal not defined".

Someone should open an issue for this.