ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 15 Mar 2022 23:02:33 +0100Changing terminal color on Windowshttps://ask.sagemath.org/question/61519/changing-terminal-color-on-windows/I ran the installation without admin privileges, and the Sage Console seemed to be working. But I don't like dark mode, so I was trying to find my way around to figure out how to invoke lightBG (which I thought was supposed to be the default). Not finding that easy, I was surprised to discover that no environment variables had been created or new PATH items added. Eg., I could not run sage at the command line (without a full path). So I thought that maybe I should run the installer with admin privileges and install it for everybody. Even worse! Now, on trying to start the console, bash is immediately and repeatedly complaining "could not find file /tmp".
Furthermore, still no additions to environment variables or to PATH.
I did try starting bash and issuing command "mkdir /tmp". It claims to have succeeded. But it did not help for the console. Furthermore, a second attempt is met with "file exists".
Any helpful suggestions would be appreciated.DrHowTue, 15 Mar 2022 23:02:33 +0100https://ask.sagemath.org/question/61519/SageMath support in Jedi (hence in jedi-vim)https://ask.sagemath.org/question/50801/sagemath-support-in-jedi-hence-in-jedi-vim/I want to make [jedi](https://github.com/davidhalter/jedi) (autocompletion, static analysis and refactoring library for python) to understand Sage code. I want to integrate it with vim via [jedi-vim](https://github.com/davidhalter/jedi-vim/) but there are plenty of other editors\IDEs with support of jedi
There is [a discussion](https://github.com/davidhalter/jedi-vim/issues/262) with some evidence of possibility of that combo:
> Well, I wound up figuring this out. I
> just had to turn the problem around
> and include the sage path in the
> normal python path (export
> PYTHONPATH=/usr/lib/sagemath/src) -
> not switch the Jedi interpreter to be
> the sage interpreter. Seems to work
> well now. Thanks for the response!
But I cannot figure out what should I do to make it work.
P.S. It seems that there are some successes on the subject with different approaches: [PyCharm (windows)](https://ask.sagemath.org/question/39742/make-pycharm-recognise-the-sage-python-interpreter/) and [Vscode](https://ask.sagemath.org/question/43240/sagemath-and-vscode/).petRUShkaThu, 16 Apr 2020 21:32:49 +0200https://ask.sagemath.org/question/50801/Batch file and Sagehttps://ask.sagemath.org/question/47997/batch-file-and-sage/Hi,
I am using SLURM (https://slurm.schedmd.com/) to run a batch process on a cluster of computers. Here is the following .slrm file that I have:
#!/bin/bash
#SBATCH --time=1:59:00
#SBATCH --ntasks=1
#SBATCH --mem=3820
#SBATCH -O
#SBATCH --output=/data/scratch/kbari/slrmbt_%A_%a.out
#SBATCH --array=1-50
sage --nodotsage /data/scratch/kbari/slurmbatchtest.py $SLURM_ARRAY_TASK_ID
I get an error that: "Error: HOME directory '/u/grad/kbari' does not exist.
Error setting environment variables by sourcing '/usr/local/SageMath/src/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
I understand the error to be that it is trying to access sage from a different directory, which it does not have access to and cannot find as a result. So how can I change the environment variable to just tell it to run Sage not from that directory?
Thanks for your time!BarkFri, 20 Sep 2019 22:25:00 +0200https://ask.sagemath.org/question/47997/Sage Python Executable On Linuxhttps://ask.sagemath.org/question/44828/sage-python-executable-on-linux/Hi. I installed Sage from https://www.archlinux.org/packages/community/x86_64/sagemath/
I want to use the same Python sage uses to get code completion in my editor. Where can I locate this Python?rijndaelxyzTue, 01 Jan 2019 10:29:15 +0100https://ask.sagemath.org/question/44828/Running sage dependent scripts throws errorhttps://ask.sagemath.org/question/10648/running-sage-dependent-scripts-throws-error/script1.sage:
#!/usr/bin/env sage
import script2
script2.sage:
#!/usr/bin/env sage
smth
After I've done:
sage script2.sage # script2.py was generated
sage script1.sage # script1.py generated that uses script2.py
Both **script1** and **script2** do have:
from sage.all_cmdline import *
Everything works good if I:
/usr/bin/env sage script1.sage # or
sage script1.sage
But when trying to run script1.sage in this way:
./script1.sage
# =>
# Traceback (most recent call last):
# File "./script1.sage", line 4, in <module>
# import script2
# File "path/script2.py", line 2, in <module>
# from sage.all_cmdline import * # import sage library
# ImportError: No module named sage.all_cmdline
Why?warbotWed, 23 Oct 2013 05:57:43 +0200https://ask.sagemath.org/question/10648/When would sage -sh not work?https://ask.sagemath.org/question/8290/when-would-sage-sh-not-work/When is `./sage -sh` NOT supposed to work? That is, where should this work in the spkg build process? My sense is that it should work almost immediately - even before Python, right? - but sometimes I get the message about it not working in the middle of a build I need to `./sage -sh` in to set environment variables correctly.
I should point out that currently I have a lot of stuff built - Python, Pari, GSL, ecl, elliptic curves - but when I do what the message says (edit `$SAGE_ROOT` in `./sage`) then I just get a message about `sage-sage` not existing in `local/bin`, which it is true, it does not.
An acceptable answer to this could include any *other* way to set the appropriate variables during a build.kcrismanWed, 24 Aug 2011 14:49:59 +0200https://ask.sagemath.org/question/8290/