Sage runs in Window's 10's new Unix subsystem

1,102 views
Skip to first unread message

Brian Beavers

unread,
May 10, 2016, 7:47:17 PM5/10/16
to sage-devel
I don't know if any of you are Windows Insiders and are following the new features for the Windows 10 upgrade due out in July, but I was able to install and run Sage (via the PPA) in the new bash shell/UNIX subsystem for Windows (see attached screenshot). The notebook server launches and I am able to access the notebook server via browser pointing to localhost:8080, but I get an Internal Server Error when I try to actually create and open a notebook. However, I can run basic sage commands in the bash shell with Sage running. This may be a good direction for  getting Sage running "natively" on Windows. I'm going to continue to test things out. I'm hoping this bodes well for being able to work on mathbookxml projects in Windows.

Cheers,

Brian

Brian Beavers, Ph.D., Associate Professor

Coordinator of Computing and Webmaster

Department of Mathematics and Statistics

Stephen F. Austin State University

Math Building 310 | 936.468.1433

Science Building 200 | 936.468.2177

beav...@sfasu.edu



2016-05-10.png

Rob Beezer

unread,
May 11, 2016, 2:12:59 AM5/11/16
to sage-devel
Dear Brian,

Appears it is some flavor of Ubuntu Linux running within Windows?

https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/

I hadn't heard.  ;-)

Rob

Dima Pasechnik

unread,
May 11, 2016, 2:46:42 AM5/11/16
to sage-devel


On Wednesday, May 11, 2016 at 7:12:59 AM UTC+1, Rob Beezer wrote:
Dear Brian,

Appears it is some flavor of Ubuntu Linux running within Windows?

https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/

right. 

I tried to build Sage on such a thing, but patch(1) is broken there.

it's all clearly a bit rough at the moment...

Dima

Erik Bray

unread,
May 13, 2016, 7:45:52 AM5/13/16
to sage-...@googlegroups.com
My understanding is that this is currently being positioned *solely*
as a tool for developers (and in particular it seems web developers
have driven a lot of this work initially, though I'm sure once it's in
the wild its use cases will broaden). This article in Ars Technica
gives some more of the historical background to this, and why it's
being considered a development tool *only* right now:
http://arstechnica.com/information-technology/2016/04/why-microsoft-needed-to-make-windows-run-linux-software/

My point is that it is not being supported, at least initially, for
deployment either in servers or for end users. Which is not to say it
*couldn't* be used in that way. I haven't tried it yet myself and
don't know what the limitations are, but I don't see what would stop
someone from distributing software that requires the WSL (Windows
Subsystem for Linux, as they're calling it) to run. But it's not
officially supported to do that either.

It's also not clear to me whether this will be available on all
Windows 10 systems (with the appropriate update) or if it will be an
optional add-on users would have to install.

Still, this is definitely a Big Deal and worth keeping an eye on.

Erik

Ralf Stephan

unread,
May 14, 2016, 2:57:50 AM5/14/16
to sage-devel
On Friday, May 13, 2016 at 1:45:52 PM UTC+2, Erik Bray wrote:
http://arstechnica.com/information-technology/2016/04/why-microsoft-needed-to-make-windows-run-linux-software/

My point is that it is not being supported, at least initially, for
deployment either in servers or for end users.

Quote from the article:
"WSL also doesn't include X Windows or any other graphical subsystem; it's strictly for command-line applications only."

Rob Beezer

unread,
May 16, 2016, 2:27:13 AM5/16/16
to sage-devel
On Friday, May 13, 2016 at 11:57:50 PM UTC-7, Ralf Stephan wrote:
Quote from the article:
"WSL also doesn't include X Windows or any other graphical subsystem; it's strictly for command-line applications only."

In an off-list email Brian Beavers (OP) told me:

"Also, with Xming X server, you can even get graphical Linux applications to run"

So maybe there is an avenue there for graphical applications.

Rob

Dima Pasechnik

unread,
May 16, 2016, 3:31:19 AM5/16/16
to sage-devel
one can do graphics in a browser running on the host, so this is not really a big limitation.

William Stein

unread,
May 18, 2016, 9:44:11 AM5/18/16
to sage-devel
What you did gets discussed/advertised at the beginning of this podcast:

https://talkpython.fm/episodes/show/59/sagemath-open-source-is-ready-to-compete-in-the-classroom
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



--
William (http://wstein.org)

Brian Beavers

unread,
May 18, 2016, 9:48:33 AM5/18/16
to sage-...@googlegroups.com
I've discovered why the notebook server (and administrative pages within) loads but notebooks do not load: WSL does not yet suppot pty. When I try to create a worksheet, back in the terminal Sage throws an error that it is out of pty instances. 



Brian Beavers, Ph.D., Associate Professor
Department of Mathematics & Statistics

Stephen F. Austin State University
On Mon, May 16, 2016 at 2:31 AM, Dima Pasechnik <dim...@gmail.com> wrote:
one can do graphics in a browser running on the host, so this is not really a big limitation.

William Stein

unread,
May 18, 2016, 9:50:31 AM5/18/16
to sage-...@googlegroups.com


On Wednesday, May 18, 2016, Brian Beavers <drbeav...@gmail.com> wrote:
I've discovered why the notebook server (and administrative pages within) loads but notebooks do not load: WSL does not yet suppot pty. When I try to create a worksheet, back in the terminal Sage throws an error that it is out of pty instances. 


What happens if you do 

gp.eval('2+2') 

in the terminal?

Also, unlike sagenb, jupyter doesn't use pty's so it won't have this obstruction.
 


Brian Beavers, Ph.D., Associate Professor
Department of Mathematics & Statistics
Stephen F. Austin State University

On Mon, May 16, 2016 at 2:31 AM, Dima Pasechnik <dim...@gmail.com> wrote:
one can do graphics in a browser running on the host, so this is not really a big limitation.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


--
Sent from my massive iPhone 6 plus.

Brian Beavers

unread,
May 18, 2016, 10:04:45 AM5/18/16
to sage-...@googlegroups.com
Looks like there's more going on than just a lack of pty. Here's the result:

sage: gp.eval('2+2')
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-e5d4083fb83e> in <module>()
----> 1 gp.eval('2+2')

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1237                 elif split_lines:
   1238                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1239                                         for L in code.split('\n') if L != ''])
   1240                 else:
   1241                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/gp.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    437         a = Expect._eval_line(self, line,
    438                               allow_use_file=allow_use_file,
--> 439                               wait_for_prompt=wait_for_prompt)
    440         if a.find("the PARI stack overflows") != -1:
    441             verbose("automatically doubling the PARI stack and re-executing current input line")

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    848         try:
    849             if self._expect is None:
--> 850                 self._start()
    851             E = self._expect
    852             try:

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/gp.pyc in _start(self, alt_message, block_during_init)
    237
    238     def _start(self, alt_message=None, block_during_init=True):
--> 239         Expect._start(self, alt_message, block_during_init)
    240         # disable timer
    241         self._eval_line('default(timer,0);')

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in _start(self, alt_message, block_during_init)
    423                         env=pexpect_env,
    424                         name=self._repr_(),
--> 425                         quit_string=self._quit_string())
    426             except (ExceptionPexpect, pexpect.EOF) as e:
    427                 # Change pexpect errors to RuntimeError

sage/interfaces/sagespawn.pyx in sage.interfaces.sagespawn.SageSpawn.__init__ (/usr/lib/sagemath//src/build/cythonized/sage/interfaces/sagespawn.c:1331)()

sage/interfaces/sagespawn.pyx in sage.interfaces.sagespawn.SageSpawn.__init__ (/usr/lib/sagemath//src/build/cythonized/sage/interfaces/sagespawn.c:1284)()

/usr/lib/sagemath/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in __init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors, dimensions)
    191             self.name = '<pexpect factory incomplete>'
    192         else:
--> 193             self._spawn(command, args, preexec_fn, dimensions)
    194
    195     def __str__(self):

/usr/lib/sagemath/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in _spawn(self, command, args, preexec_fn, dimensions)
    286
    287         self.ptyproc = self._spawnpty(self.args, env=self.env,
--> 288                                      cwd=self.cwd, **kwargs)
    289
    290         self.pid = self.ptyproc.pid

sage/interfaces/sagespawn.pyx in sage.interfaces.sagespawn.SageSpawn._spawnpty (/usr/lib/sagemath//src/build/cythonized/sage/interfaces/sagespawn.c:1520)()

/usr/lib/sagemath/local/lib/python2.7/site-packages/ptyprocess/ptyprocess.pyc in spawn(cls, argv, cwd, env, echo, preexec_fn, dimensions)
    218
    219         if use_native_pty_fork:
--> 220             pid, fd = pty.fork()
    221         else:
    222             # Use internal fork_pty, for Solaris

/usr/lib/sagemath/local/lib/python/pty.pyc in fork()
    105         return pid, fd
    106
--> 107     master_fd, slave_fd = openpty()
    108     pid = os.fork()
    109     if pid == CHILD:

/usr/lib/sagemath/local/lib/python/pty.pyc in openpty()
     27     except (AttributeError, OSError):
     28         pass
---> 29     master_fd, slave_name = _open_terminal()
     30     slave_fd = slave_open(slave_name)
     31     return master_fd, slave_fd

/usr/lib/sagemath/local/lib/python/pty.pyc in _open_terminal()
     68                 continue
     69             return (fd, '/dev/tty' + x + y)
---> 70     raise os.error, 'out of pty devices'
     71
     72 def slave_open(tty_name):

OSError: out of pty devices


Brian Beavers, Ph.D., Associate Professor
Department of Mathematics & Statistics
Stephen F. Austin State University

William Stein

unread,
May 18, 2016, 10:07:02 AM5/18/16
to sage-...@googlegroups.com


On Wednesday, May 18, 2016, Brian Beavers <drbeav...@gmail.com> wrote:
Looks like there's more going on than just a lack of pty. Here's the result:


Well that is just another test of pty...   

gnk...@gmail.com

unread,
Dec 5, 2016, 5:24:21 AM12/5/16
to sage-devel
Hi from me. My (more recent) experience is similar but not identical. I install sage from the ppa and I am having problems. Sage loads and seems to be working, but:

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.3, Release Date: 2016-08-04                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘

sage: gp.eval('2+2')
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-e5d4083fb83e> in <module>()
----> 1 gp.eval('2+2')

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1292                 elif split_lines:
   1293                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1294                                         for L in code.split('\n') if L != ''])
   1295                 else:
   1296                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)


/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/gp.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    439         a = Expect._eval_line(self, line,
    440                               allow_use_file=allow_use_file,
--> 441                               wait_for_prompt=wait_for_prompt)
    442         if a.find("the PARI stack overflows") != -1:
    443             verbose("automatically doubling the PARI stack and re-executing current input line")


/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    903         try:
    904             if self._expect is None:
--> 905                 self._start()
    906             E = self._expect
    907             try:


/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/gp.pyc in _start(self, alt_message, block_during_init)
    239
    240     def _start(self, alt_message=None, block_during_init=True):
--> 241         Expect._start(self, alt_message, block_during_init)
    242         # disable timer
    243         self._eval_line('default(timer,0);')


/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in _start(self, alt_message, block_during_init)
    480                         env=pexpect_env,
    481                         name=self._repr_(),
--> 482                         quit_string=self._quit_string())
    483             except (ExceptionPexpect, pexpect.EOF) as e:
    484                 # Change pexpect errors to RuntimeError

sage/interfaces/sagespawn.pyx in sage.interfaces.sagespawn.SageSpawn.__init__ (/usr/lib/sagemath//src/build/cythonized/sage/interfaces/sagespawn.c:1446)()

sage/interfaces/sagespawn.pyx in sage.interfaces.sagespawn.SageSpawn.__init__ (/usr/lib/sagemath//src/build/cythonized/sage/interfaces/sagespawn.c:1398)()


/usr/lib/sagemath/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in __init__(self, command, args, timeout, maxread, searchwindowsize, logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors, dimensions)
    196             self.name = '<pexpect factory incomplete>'
    197         else:
--> 198             self._spawn(command, args, preexec_fn, dimensions)
    199
    200     def __str__(self):


/usr/lib/sagemath/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in _spawn(self, command, args, preexec_fn, dimensions)
    296
    297         self.ptyproc = self._spawnpty(self.args, env=self.env,
--> 298                                      cwd=self.cwd, **kwargs)
    299
    300         self.pid = self.ptyproc.pid

sage/interfaces/sagespawn.pyx in sage.interfaces.sagespawn.SageSpawn._spawnpty (/usr/lib/sagemath//src/build/cythonized/sage/interfaces/sagespawn.c:1631)()


/usr/lib/sagemath/local/lib/python2.7/site-packages/ptyprocess/ptyprocess.pyc in spawn(cls, argv, cwd, env, echo, preexec_fn, dimensions)
    218
    219         if use_native_pty_fork:
--> 220             pid, fd = pty.fork()
    221         else:
    222             # Use internal fork_pty, for Solaris

/usr/lib/sagemath/local/lib/python/pty.pyc in fork()
    106

    107     master_fd, slave_fd = openpty()
--> 108     pid = os.fork()

    109     if pid == CHILD:
    110         # Establish a new session.

OSError: [Errno 12] Cannot allocate memory
sage:

and I cannot load the notebook interface:

sage: notebook()
---------------------------------------------------------------------------
EnvironmentError                          Traceback (most recent call last)
<ipython-input-2-3728cb3d7c7d> in <module>()
----> 1 notebook()

sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (/usr/lib/sagemath//src/build/cythonized/sage/misc/lazy_import.c:3635)()

sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport._get_object (/usr/lib/sagemath//src/build/cythonized/sage/misc/lazy_import.c:2242)()

/usr/lib/sagemath/local/lib/python2.7/site-packages/sagenb/notebook/notebook_object.py in <module>()
     15 import time, os, shutil, signal, tempfile
     16
---> 17 import notebook as _notebook
     18
     19 import run_notebook

/usr/lib/sagemath/local/lib/python2.7/site-packages/sagenb/notebook/notebook.py in <module>()
     33
     34 # Sage libraries
---> 35 from sagenb.misc.misc import (pad_zeros, cputime, tmp_dir, load, save,
     36                               ignore_nonexistent_files, unicode_str)
     37

/usr/lib/sagemath/local/lib/python2.7/site-packages/sagenb/misc/misc.py in <module>()
    379
    380 try:
--> 381     from sage.misc.cython import cython
    382 except ImportError:
    383     @stub

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/misc/cython.py in <module>()
     28
     29 # CBLAS can be one of multiple implementations
---> 30 cblas_pc = pkgconfig.parse('cblas')
     31 cblas_libs = list(cblas_pc['libraries'])
     32 cblas_library_dirs = list(cblas_pc['library_dirs'])

/usr/lib/sagemath/local/lib/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg/pkgconfig/pkgconfig.py in parse(packages)
    185
    186     for package in packages.split():
--> 187         for k, v in parse_package(package).items():
    188             result[k].update(v)
    189

/usr/lib/sagemath/local/lib/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg/pkgconfig/pkgconfig.py in parse_package(package)
    158
    159         # Execute the query to pkg-config and clean the result.
--> 160         out = _query(package, '--cflags --libs')
    161         out = out.replace('\\"', '')
    162

/usr/lib/sagemath/local/lib/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg/pkgconfig/pkgconfig.py in _wrapper(*args, **kwargs)
     56           
Enter code here...


  return func(*args, **kwargs)
     57         except OSError:
---> 58             raise EnvironmentError("pkg-config is not installed")
     59
     60     return _wrapper

EnvironmentError: pkg-config is not installed
sage:


while I do have pkg-config installed.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--
Sent from my massive iPhone 6 plus.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscribe@googlegroups.com.

To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Bill Hart

unread,
Dec 9, 2016, 7:48:30 AM12/9/16
to sage-devel
The Sage Notebook isn't likely to work under the WSL. It's a text console environment only. Microsoft intended it mainly to provide Linux development tools to people, not as a way of running graphical applications. 

You can probably fix the memory allocation issues though. You likely need to increase the Pagefile system size. Windows allocates a ridiculously small amount of memory for this.

There's a walkthrough here:


I use 16GB on my system (of course you need enough disk space).

Bill.

Dima Pasechnik

unread,
Dec 9, 2016, 9:15:43 AM12/9/16
to sage-devel


On Friday, December 9, 2016 at 12:48:30 PM UTC, Bill Hart wrote:
The Sage Notebook isn't likely to work under the WSL. It's a text console environment only. Microsoft intended it mainly to provide Linux development tools to people, not as a way of running graphical applications. 

Hmm, no, all what gets to run here is a web server (on a local port) talking to a Sage backend. Graphics happens in a web browser, so it should not be a problem of being "text console only".

Bill Hart

unread,
Dec 9, 2016, 5:13:03 PM12/9/16
to sage-devel
Ah I see. I assumed it would also try to spawn a browser or something.

On the other hand, I understand some of the networking stuff is still not completed. You can of course use wget and the like so it can't be too broken.

Bill.

Dima Pasechnik

unread,
Dec 9, 2016, 5:51:46 PM12/9/16
to sage-devel


On Friday, December 9, 2016 at 10:13:03 PM UTC, Bill Hart wrote:
Ah I see. I assumed it would also try to spawn a browser or something.

the default ( notebook()) is indeed to try to open a browser/browser tab to show the URL served by the server, whereas

notebook(automatic_login=False) 

will just run the server, and let the user to do the rest (connect to the URL using a browser).

GK

unread,
Dec 15, 2016, 1:40:11 AM12/15/16
to sage-devel
Hi again, thanks to the insight. I managed to successfully run sage in WSL. notebook(automatic_login='False') triggered indeed a different reaction, but again did not work. The trick was to run bash on ubuntu on windows as administrator and run sage. Afterwards all seem to work even without running Bash as administrator. (except that sage does not manage to open the browser, I do that manually). Also, I have added the line

127.0.0.1 localhost YOUR_MACHINE_NAME_HERE

in /etc/hosts, which may be necessary for the sage server to start.

Bill Hart

unread,
Dec 15, 2016, 6:09:55 PM12/15/16
to sage-devel
It works for me too!

GK

unread,
Dec 27, 2016, 1:28:22 AM12/27/16
to sage-devel
After some windows update, it does not work for me anymore... :(

Sage starts, the notebook loads, but once I try to do anything (i.e. create a new worksheet or open an existing one) I get a server error (on the browser) and some '[Errno 12] Cannot allocate memory' on the terminal. As suggested at some previous post, I increased the amount of virtual memory, but nothing changed.

Bill Hart

unread,
Jan 8, 2017, 6:56:06 AM1/8/17
to sage-devel


On Tuesday, 27 December 2016 07:28:22 UTC+1, GK wrote:
After some windows update, it does not work for me anymore... :(

Sage starts, the notebook loads, but once I try to do anything (i.e. create a new worksheet or open an existing one) I get a server error (on the browser) and some '[Errno 12] Cannot allocate memory' on the terminal. As suggested at some previous post, I increased the amount of virtual memory, but nothing changed.

I am not having any problem starting the notebook. You might genuinely be out of memory, or hard drive space.

I am having a problem with the notebook itself, in that it says "Error typesetting mathematics", instead of displaying the result of any computation. Probably there's some package that needs to be installed that is not. This was already a problem before though. I don't use the notebook, so am not personally affected by this.

Bill. 

GK

unread,
Jan 12, 2017, 3:43:47 AM1/12/17
to sage-devel


I am not having any problem starting the notebook. You might genuinely be out of memory, or hard drive space.


I am not having trouble starting the notebook either, but I can not do anything with it, also, no, I am not running out of memory nor hard disk space.

I have increased the amount of virtual memory usable by windows to a ridiculous amount and I am running everything and monitoring my system at the same time and memory/hard disk space do not run out. Perhaps the amount of memory or hard disk space allocated by windows to the linux subsystem does actually run out, but I do not know how to check that. I related the problem with the windows update, as exactly before the update everything ran smoothly and right after the update sage never ran again. I do not think this is a coincidence...

David Joyner

unread,
Jan 12, 2017, 6:00:37 AM1/12/17
to sage-devel
On Thu, Jan 12, 2017 at 3:43 AM, GK <gnk...@gmail.com> wrote:
>
>>
>> I am not having any problem starting the notebook. You might genuinely be
>> out of memory, or hard drive space.
>>
>
> I am not having trouble starting the notebook either, but I can not do
> anything with it, also, no, I am not running out of memory nor hard disk
> space.
>

I've tested the notebook out at work where there's a windows machine.
(a) It doesn't seem to work in IE.
(b) In chrome and FF, the initial command is very slow. Maybe 15
seconds or more. After that, it speeds up but is never snappy like the
CLI.
(c) I only tried the CLI once in windows and it seems to work fine. I
don't remember it being slow.

GK: Does your experience match this?

> I have increased the amount of virtual memory usable by windows to a
> ridiculous amount and I am running everything and monitoring my system at
> the same time and memory/hard disk space do not run out. Perhaps the amount
> of memory or hard disk space allocated by windows to the linux subsystem
> does actually run out, but I do not know how to check that. I related the
> problem with the windows update, as exactly before the update everything ran
> smoothly and right after the update sage never ran again. I do not think
> this is a coincidence...
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.

GK

unread,
Jan 19, 2017, 6:26:21 AM1/19/17
to sage-devel

On Thursday, January 12, 2017 at 2:00:37 PM UTC+3, David Joyner wrote:
On Thu, Jan 12, 2017 at 3:43 AM, GK <gnk...@gmail.com> wrote:
>
>>
>> I am not having any problem starting the notebook. You might genuinely be
>> out of memory, or hard drive space.
>>
>
> I am not having trouble starting the notebook either, but I can not do
> anything with it, also, no, I am not running out of memory nor hard disk
> space.
>

I've tested the notebook out at work where there's a windows machine.
(a) It doesn't seem to work in IE.
(b) In chrome and FF, the initial command is very slow. Maybe 15
seconds or more. After that, it speeds up but is never snappy like the
CLI.
(c) I only tried the CLI once in windows and it seems to work fine. I
don't remember it being slow.

GK: Does your experience match this?

Dear David,

(a) I haven't tried IE or Chrome, I tried FF and Edge and did not notice any difference between the browsers.
(b) Even when it was working, the notebook indeed needed a lot of time to load, just as you describe. After that, the speed was OK.
(c) Although I haven't done any complex work on the CLI, it does indeed seem to work normally and snappy.
 

GK

unread,
Feb 8, 2017, 2:27:48 AM2/8/17
to sage-devel
I recently updated Sage to version 7.5.1 (from the ppa) and although the behavior is still the same, a new warning message might give us some insight:

/usr/lib/sagemath/local/lib/python2.7/site-packages/psutil/_pslinux.py:364: RuntimeWarning: 'sin' and 'sout' swap memory stats couldn't be determined and were set to 0 ([Errno 2] No such file or directory: '/proc/vmstat')

Also, I found this, so maybe the problem is with that WSL does not properly support virtual memory?

Erik Bray

unread,
Feb 9, 2017, 8:03:59 AM2/9/17
to sage-devel
On Wed, Feb 8, 2017 at 8:27 AM, GK <gnk...@gmail.com> wrote:
> I recently updated Sage to version 7.5.1 (from the ppa) and although the
> behavior is still the same, a new warning message might give us some
> insight:
>
> /usr/lib/sagemath/local/lib/python2.7/site-packages/psutil/_pslinux.py:364:
> RuntimeWarning: 'sin' and 'sout' swap memory stats couldn't be determined
> and were set to 0 ([Errno 2] No such file or directory: '/proc/vmstat')
>
> Also, I found this, so maybe the problem is with that WSL does not properly
> support virtual memory?

That's pretty unsurprising--Windows VM model is very different from
Linux. Even on Cygwin /proc/vmstat works, but is not the same as what
you would expect on Linux.

I've been working (very slowly) on a patch to psutil for it to work on
Cygwin. Some of that work will probably be transferrable to WSL
(though I'm not sure how one detects if you're running under WSL...?)
Reply all
Reply to author
Forward
0 new messages