On Thu, May 16, 2019 at 6:15 PM 刘鹏 <littlenewt...@gmail.com> wrote: > > Dear my friend, > > I do the installation under your help. I reinstalled the sagemath software > with the steps: > 1. download the latest version of SageMath 8.7 for Linux Ubuntu 18.04, and mv > sage-8.7-Ubuntu_18.04-x86_64.tar.bz2 /usr/local/ > 2. Reinstall WSL Ubuntu 18.04 > 3. mkdir /usr/local/SageMath && chown -R newton /usr/local/SageMath > 4. cd /usr/local/ tar xjvf sage-8.7-Ubuntu_18.04-x86_64.tar.bz2 > 5. chown -R newton /usr/local/SageMath > 6. cd SageMath/ && ./sage > 7. chown -R newton /usr/local/SageMath > 8. alias sage='/usr/local/SageMath/sage' > > when I type sage in terminal with normal user, sage can be used. But there is > still a warning: > > newton@Newton-PC-4:~$ sage > ┌────────────────────────────────────────────────────────────────────┐ > │ SageMath version 8.7, Release Date: 2019-03-23 │ > │ Using Python 2.7.15. Type "help()" for help. │ > └────────────────────────────────────────────────────────────────────┘ > /usr/local/SageMath/local/lib/python2.7/site-packages/psutil/_pslinux.py:469: > 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') > warnings.warn(msg, RuntimeWarning) > sage: 1 + 1 > 2 > sage: > > Is it the bug of WSL or there is still something wrong? Most probably psutil does not work on WSL.
psutils is a Python module to show how busy the CPU, etc. It is not really essential for Sage. So you can ignore this warning (I hope it is only printed once per session) Hope this helps, Dmitrii > > henri.gir...@gmail.com <henri.gir...@gmail.com> 于2019年5月16日周四 下午5:20写道: >> >> I guess he uses sudo to install the sagemath deb package as he is using >> the nativ (!) one... But sorry for insisting, the last version of sage >> on the web site is much more recent and can be used in home . >> >> Le 16/05/2019 à 10:39, Dima Pasechnik a écrit : >> > On Thu, May 16, 2019 at 7:55 AM 刘鹏 <littlenewt...@gmail.com> wrote: >> >> Q1 >> >>> why did you use sudo ? >> >>> >> >>> This appears to be completely unnecessary. >> >> >> >> I am sorry for showing that. But now, I can use sagemath with this >> >> command in .bashrc >> >> alias sage=''sudo ~/SageMath/sage' >> >> I think this is because I use sagemath the first time with sudo. I don't >> >> know what happened during I running sagemath the first time. >> > This is because Sage maintains a data cache in ~/.sage/ >> > Running Sage with sudo created/updated files in ~/.sage/ with wrong >> > (i.e. root) ownership, >> > It might have also changed ownerships of some files in >> > ~/SageMath/local/ - although this is less likely. >> > >> > You can see ownerships in ~/.sage/ by running "ls -alR ~/.sage/", and >> > similarly for ~/SageMath/ >> > >> > You can (actually, you should) change ownerships back to your "normal" user >> > bu running "sudo chown -R ~/.sage/ <username>" >> > and "sudo chown -R ~/Sage/ <username>" >> > (where <username> should be replaced by your real username, - >> > something that on "real" Linux systems >> > is printed by the command "whoami") >> > >> > This is assuming that "chown" actually works on WSL as it should... >> > >> > Then it should not be necessary to use "sudo" any more. >> > >> > Using "sudo" is a bad idea in such a case, e.g. as in Python you have >> > full access to the file system, so you can accidentally destroy your >> > WSL installation. >> > >> > Let us know if all this makes sense and works. >> > >> >> Q2 >> >>> and does it still work if you don't use the alias? >> >> alias just replace the command. There is no different between alias the >> >> the original command. >> >> >> >> Q3 >> >>> Anyhow, we need a detailed bug report if you like us to look at it >> >>> ("it crashed" is not enough - we need to see error messages, relevant >> >>> log files, etc) >> >> I am sorry for my issue not so detailed. I use sagemath to do the >> >> experiment in my bachelor thesis. This PC for doing experiment still in >> >> the lab. I will come back to run the installation again and get the log >> >> file. >> >> >> >> Thanks. >> >> >> >> Dima Pasechnik <dimp...@gmail.com> 于2019年5月15日周三 下午3:14写道: >> >>> On Tue, May 14, 2019 at 10:16 PM 刘鹏 <littlenewt...@gmail.com> wrote: >> >>>> Dear my friends, >> >>>> >> >>>> After I installed the sagemath 8.7 in Windows Subsystem for Linux >> >>>> Ubuntu 18.04, crash happend. >> >>>> >> >>>> (decomperssed ==> move folder to my home directory ==> sudo ./sage). >> >>> why did you use sudo ? >> >>> This appears to be completely unnecessary. >> >>> >> >>>> When I first finished the installation, the first running is very >> >>>> normal. However when the second time I add "alias >> >>>> sage='~/SageMath/sage'" and type sage in terminal, it crashed. >> >>> and does it still work if you don't use the alias? >> >>> >> >>> Anyhow, we need a detailed bug report if you like us to look at it >> >>> ("it crashed" is not enough - we need to see error messages, relevant >> >>> log files, etc) >> >>> >> >>>> what happened here? Is WSL not so stable or the bugs in Sage 8.7 made >> >>>> the crash? >> >>>> >> >>>> -- >> >>>> You received this message because you are subscribed to the Google >> >>>> Groups "sage-support" group. >> >>>> To unsubscribe from this group and stop receiving emails from it, send >> >>>> an email to sage-support+unsubscr...@googlegroups.com. >> >>>> To post to this group, send email to sage-support@googlegroups.com. >> >>>> Visit this group at https://groups.google.com/group/sage-support. >> >>>> To view this discussion on the web visit >> >>>> https://groups.google.com/d/msgid/sage-support/CADUebW4jES4_6HJLoVAs9tFwUKBgCuGZ0d_rfJkH80r0OxLwZg%40mail.gmail.com. >> >>>> For more options, visit https://groups.google.com/d/optout. >> >>> -- >> >>> You received this message because you are subscribed to the Google >> >>> Groups "sage-support" group. >> >>> To unsubscribe from this group and stop receiving emails from it, send >> >>> an email to sage-support+unsubscr...@googlegroups.com. >> >>> To post to this group, send email to sage-support@googlegroups.com. >> >>> Visit this group at https://groups.google.com/group/sage-support. >> >>> To view this discussion on the web visit >> >>> https://groups.google.com/d/msgid/sage-support/CAAWYfq279USRuNPPmWCX8XjqEFg1BA8TdcthQJv%3D3yzLCi8rfg%40mail.gmail.com. >> >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> >> "sage-support" group. >> >> To unsubscribe from this group and stop receiving emails from it, send an >> >> email to sage-support+unsubscr...@googlegroups.com. >> >> To post to this group, send email to sage-support@googlegroups.com. >> >> Visit this group at https://groups.google.com/group/sage-support. >> >> To view this discussion on the web visit >> >> https://groups.google.com/d/msgid/sage-support/CADUebW72vzxz-2hWkPcf%3DKcQjvNceOY_Sv2kooL__JhyD7eh6A%40mail.gmail.com. >> >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-support" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-support+unsubscr...@googlegroups.com. >> To post to this group, send email to sage-support@googlegroups.com. >> Visit this group at https://groups.google.com/group/sage-support. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sage-support/30bbe228-9748-fbf1-4ae3-d9ed333f5764%40gmail.com. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-support. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/CADUebW42H4teh8puvkUedD1fQyE4T%2B6aLazf6qpr%3D5hnjA%2BzHQ%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAAWYfq3jF9URBWejDyj6zn64CC%3DqCaCCDvsKHgUTXd1oQKgi7w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.