Ask Your Question

murraye's profile - activity

2023-10-02 22:45:12 +0200 asked a question manifolds docs

manifolds docs I installed SageMath 10.1 from https://sagemanifolds.obspm.fr/download.html. At that page: (1) it is a

2023-10-02 22:45:11 +0200 asked a question manifolds docs

manifolds docs I installed SageMath 10.1 from https://sagemanifolds.obspm.fr/download.html. At that page: (1) it is a

2023-03-08 11:19:43 +0200 received badge  Notable Question (source)
2022-08-31 20:26:06 +0200 answered a question Cannot launch command line session: libncurses problem

The issue was resolved by installing the universal variant of the MacPorts port ncurses (port install ncurses +universal

2022-08-30 02:57:03 +0200 commented answer How reach octave or Macaulay2 from Sage notebook?

I thought that appending those two directories to /etc/paths would accomplish the same thing, but that does not work.

2022-08-30 02:56:16 +0200 marked best answer How reach octave or Macaulay2 from Sage notebook?

Enviroment: With SageMath 9-6-1.4.2 (arm64 architecture) under macOS 12.5.1 on an M1 Mac, I cannot directly access either octave or Macaulay2.

  • Octave is in /opt/local/bin and the Macaulay2 executable M2 is in /Applications/Macaulay2-1.20/bin.
  • Both paths were already in the path exported from my .profile (this is relevant to possible workarounds #1, below).
  • I can run both M2 and octave successfully from a Terminal command-line.

Problems: Octave: In the jupyter notebook (with the SageMath 9.6 kernel running, I evaluated:

octave.eval('2+2')

The long error that ensued included:

RuntimeError: unable to start octave because the command "octave-cli --no-line-editing --silent --eval 'PS2(PS1());more off' --persist" failed: The command was not found or was not executable: octave-cli.

Similarly, when I evaluated

macaulay2('3/5 + 7/11')

I get a long error message that includes:

TypeError: unable to start macaulay2 because the command 'M2 --no-debug --no-readline --silent -e \'sageLoadMode = false;ZZ#{Standard,Core#"private dictionary"#"InputPrompt"} = ZZ#{Standard,Core#"private dictionary"#"InputContinuationPrompt"} = lineno -> if(sageLoadMode) then "_EGAS_LOAD_ : " else "_EGAS_ : ";printWidth = 0;lineNumber = 10^9;sageAssign = (k, v) -> (if not instance(v, Sequence) then use v; k <- v);\'' failed: The command was not found or was not executable: M2.

Possible workarounds:

  1. The method described in https://ask.sagemath.org/question/794...: This does not work for me, as it now causes SageMath-9-6.app not to open at all. (Since the current executable inside the SageMath-9-6.app package is named SageMath rather than Sage,I did changeSagetoSageMathfor the name of the added shell script, in the last line of that shell script, and as the value ofCFBundleExecutableininfo.plist`).
  2. The method described in the first comment at https://ask.sagemath.org/question/571...:

For Macaulay2, this sort of thing does work:

m2=Macaulay2(command='/Applications/Macaulay2-1.20/bin/M2')
m2('3/5+7/11')

For Octave:

oc=octave(command='/opt/local/bin/octave')

This does not work! Error:

TypeError Traceback (most recent call last)
/var/folders/r2/v_ly_rjj6_v1qpzx4kqy_mqr0000gn/T/ipykernel_4852/1477866728.py in <module>
----> 1 oc=octave(command='/opt/local/bin/octave')

TypeError: Interface.__call__() got an unexpected keyword argument 'command'

QUESTIONS:

(a) the workaround 2 for the call to Macaulay2 seems awkward. How can one take care of the path issue transparently?

(b) how make the call to octave work, too?

2022-08-29 21:44:54 +0200 asked a question Adding path entries in kernel.json does not work

Adding path entries in kernel.json does not work According to comment 5 at https://trac.sagemath.org/ticket/31773, the f

2022-08-29 19:37:42 +0200 edited question How reach octave or Macaulay2 from Sage notebook?

How reach octave or Macaulay2 from Sage notebook? Enviroment: With SageMath 9-6-1.4.2 (arm64 architecture) under macOS 1

2022-08-29 19:27:29 +0200 asked a question How reach octave or Macaulay2 from Sage notebook?

How reach octave or Macaulay2 from Sage notebook? Enviroment: With SageMath 9-6-1.4.2 (arm64 architecture) under macOS 1

2022-08-29 18:57:51 +0200 commented answer Running octave from the sage notebook

In fact, this method does not seem to work at all: Now when I open SageMath-9.6.app from /Applications, nothing whatsoev

2022-08-29 17:44:44 +0200 commented answer Running octave from the sage notebook

In current Sage-9-6 for macOS, the executable in /Applications/SageMath-9-6.app/Contents/MacOS is SageMath. So in Step 1

2022-08-29 17:44:02 +0200 commented answer Running octave from the sage notebook

In current Sage-9-6 for macOS, the executable in /Applications/SageMath-9-6.app/Contents/MacOS is SageMath. So in Step 1

2022-08-29 17:08:27 +0200 edited question Cannot launch command line session: libncurses problem

Cannot launch command line session: libncurses problem With SageMath 9-6-1.4.2 (arm64 architecture) under macOS 12.5.1 o

2022-08-29 17:06:41 +0200 asked a question Cannot launch command line session: libncurses problem

Cannot launch command line session: libncurses problem With SageMath 9-6-1.4.2 (arm64 architecture) under macOS 12.5.1 o

2022-08-28 22:37:16 +0200 commented answer Manifold not defined

D'uh. sorry, silly error: I should have known better! Thank you.

2022-08-28 22:37:04 +0200 commented answer Manifold not defined

D'uh. sorry, silly error: I should have known better!

2022-08-28 22:36:21 +0200 marked best answer Manifold not defined

Using SageMath-9.6 (v1.4.2 for arm64) under macOS 12.5.1, in a new notebook I evaluated:

Manifold(2, 'M')

and get error:

NameError Traceback (most recent call last) /var/folders/r2/v_ly_rjj6_v1qpzx4kqy_mqr0000gn/T/ipykernel_37595/1178276850.py in <module> ----> 1 Manifold(2, 'M')

NameError: name 'Manifold' is not defined

According to the docs at https://sagemanifolds.obspm.fr/downlo..., "all SageManifolds code is included in SageMath..."

What's wrong?

2022-08-28 21:52:55 +0200 asked a question Manifold not defined

Manifold not defined Using SageMath-9.6 (v1.4.2 for arm64) under macOS 12.5.1, in a new notebook I evaluated: Manifo

2022-08-28 21:37:29 +0200 asked a question Cannot docbuild to pdf - libncurses architecture problem

Cannot docbuild to pdf - libncurses architecture problem Under macOS 12.5.1 on an Mac Studio (M1 Max), I tried: sage

2021-05-31 18:10:18 +0200 received badge  Popular Question (source)
2021-05-31 18:10:02 +0200 received badge  Popular Question (source)
2021-02-16 11:31:54 +0200 received badge  Famous Question (source)
2020-12-12 16:32:13 +0200 received badge  Notable Question (source)
2020-11-21 20:44:44 +0200 received badge  Popular Question (source)
2020-11-15 17:53:00 +0200 commented question Sage 9.2 on macOS 10.15.7 not working with conda method, either

The complete set of commands I used:

conda config --add channels conda-forge

conda install mamba -c conda-forge

mamba create -n sage sage -c conda-forge

conda init zsh

[restart Terminal]

conda activate sage

I now see command line prompt (in Terminal with zsh): (sage) [~] %

AHA! If I execute command "jupyter notebook" it opens the expected jupyter front end in Safari and allows me to use the Sage 9.2 kernel for evaluation.

And now executing in Terminal command "sage" does start sage at the command-line. (Not sure what I did wrong last time: when then I issued command "sage", that command was not found.

2020-11-13 02:14:26 +0200 commented answer Sage 9.2 on macOS 10.15.7 not working with conda method, either

As I said, after issuing command "conda activate sage", I did -- in that same Terminal session -- issue command "sage", which gave the "command not found: sage" error!

2020-11-12 02:15:34 +0200 asked a question Sage 9.2 on macOS 10.15.7 not working with conda method, either

Along with others, I've reported that Sage 9.2 will not work on macOS because of a missing openssl. I tried the method using a conda environment described in https://groups.google.com/g/sage-deve... and at https://doc.sagemath.org/html/en/inst... but it doesn't work:

  • since I already have the full conda installed, I should not, and did not, install miniconda
  • instead, I just created and activated a sage environment using mamba with conda, as described.

That seemed to be OK, and using "conda activate sage" did open a sage conda environment. BUT:

  1. How do I start sage then? I tried just issuing the command "sage" on the Terminal command-line, in the sage conda environment. That gives a "Command not found" error.

    1. How do I go about using jupyter with sage using the conda method?
2020-11-10 05:19:08 +0200 asked a question How get openssl with python 3 for macOS Sage 9.2?

I just installed the app version of Sage 9.2 under macOS Catalina (10.15.7), to replace Sage 9.1 which had been working perfectly.

Starting Sage 9.2 opens file:///Applications/SageMath-9.2.app/Contents/Resources/loading-page.html in Safari, but then it hangs. Viewing the log shows:

Traceback (most recent call last): File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/repl/ipython_kernel/install.py", line 307, in have_prerequisites from notebook.notebookapp import NotebookApp File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/notebook/notebookapp.py", line 66, in <module> from tornado import httpserver File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/tornado/httpserver.py", line 29, in <module> import ssl File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/ssl.py", line 98, in <module> import _ssl # if we can't import it, let the error propagate ModuleNotFoundError: No module named '_ssl' ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.2, Release Date: 2020-10-24 │ │ Using Python 3.8.5. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ Please wait while the Sage Jupyter Notebook server starts...

The Jupyter notebook requires ssl, even if you do not use https. Install the openssl development packages in your system and then rebuild Python (sage -f python3).

What exactly do I do about openssl? I already have the MacPorts openssl @1.1.1h_0. My default python3 is from the Anaconda distribution, and I used the conda command to install openssl, and the Anaconda environment includes both openssl 1.1.1h and pyopenssl 19.1.0.

QUESTION: What more do I need to do, and how?

Is there some way that I need to install openssl into the sage environment, too, and if so, how?

Even if I take care of that, then how would I use the "sage -f python3 command": if I try to execute, e.g., "/Applications/SageMath-9.2.app/Contents/MacOS/sage --help", that tries again to start the server, but the openssl problem prevents it from opening -- which means that once I did (somehow) get the openssl requirement satisfied, I don't know how to get the command "sage -f python3" to work. Seems like a "Catch 22"!

I never had any openssl problem with Sage 9.1 (or earlier versions, either).

2020-07-29 17:23:17 +0200 asked a question How add sagemath to existing Docker webwork container

Under macOS Catalina I have a working Docker container for WeBWork. How can I add sagemath into that same container?

2020-06-14 17:22:58 +0200 commented answer How allow renaming SageMath-x.y.app to SageMath.app for sagetex

That works! Thank you.

2020-06-14 17:22:56 +0200 received badge  Supporter (source)
2020-06-14 17:22:54 +0200 received badge  Scholar (source)
2020-06-14 17:01:43 +0200 commented answer How allow renaming SageMath-x.y.app to SageMath.app for sagetex

Aha! So does it suffice to just delete SageMath-9.1.app from /Applications and then reinstall, rename, and start the first time. Or are there some other files, say in ~/Library, that have to be deleted, too? (Without destroying previously made settings to recognize various kernels, e.g., Dyalog APL, J, Julia, R, Wolfram Language?)

2020-06-14 16:55:42 +0200 received badge  Editor (source)
2020-06-14 16:51:53 +0200 asked a question How allow renaming SageMath-x.y.app to SageMath.app for sagetex

When using the sagetex with LaTeX under MacTeX and the TeXShop front end, the suggested method (from the TeXShop docs) is to rename SageMath-x.y.app to just SageMath.app and then to create symlinks for the executable sage and for sagetex.sty within the Contents of the app.

That works just fine to use sagetex in LaTeX.

However, once the renaming is done, the app itself no longer works! Once I open the renamed SageMath.app, I get a pop-up error message "Juypyter Server failed to start...", and inspecting the log reveals:

/Applications/SageMath.app/Contents/Resources/sage/src/bin/sage: line 617: /Applications/SageMath-9.1.app/Contents/Resources/sage/local/bin/python3: No such file or directory          
/Applications/SageMath.app/Contents/Resources/sage/src/bin/sage: line 617: exec: /Applications/SageMath-9.1.app/Contents/Resources/sage/local/bin/python3: cannot execute: No such file or directory

Apparently access to python3 has been hard-coded into the sage executable so that it is expect to be in the file tree with root the original name SageMath-x.y.

Is there some workaround so that one can both use sagetex in the way recommended by the MacTeX/TeXShop world and still be able to use the SageMath app normally to start the Jupyter server, etc.?

2020-05-05 03:39:38 +0200 received badge  Famous Question (source)
2020-02-21 11:53:50 +0200 received badge  Favorite Question (source)