Ask Your Question

TristanWL's profile - activity

2023-05-18 23:19:39 +0200 received badge  Famous Question (source)
2020-09-09 14:21:45 +0200 received badge  Notable Question (source)
2020-09-09 14:21:45 +0200 received badge  Popular Question (source)
2020-07-22 18:01:36 +0200 received badge  Famous Question (source)
2020-07-22 18:01:36 +0200 received badge  Popular Question (source)
2020-07-22 18:01:36 +0200 received badge  Notable Question (source)
2019-04-27 22:46:46 +0200 commented question Issue Printing Tables in Jupyter Notebook

Sorry for the late reply, I had to finish my undergraduate thesis.

This was indeed on the python3 version of sage and switching to python2 fixed it. I did not realize the machine I was running on had built sage with python3 and I apologize for not mentioning that detail. It didn't occur to me to check until you pointed it out.

2019-04-09 19:42:53 +0200 received badge  Nice Question (source)
2019-04-07 19:12:19 +0200 commented answer Issue Printing Tables in Jupyter Notebook

Ah, thanks for the reference. Does this mean that the issue is entirely on the ipython side of things? These seem to be alternative methods for printing tables, but don't explain why I'm getting some hash value when I try to use the builtin table command.

That being said, I'm not really attached to the table command other than the convenience, so I'll dive into this thread and see if I can get something else to work.

2019-04-03 18:35:30 +0200 asked a question Issue Printing Tables in Jupyter Notebook

I've been trying to display some tables in sage, in particular I would like to display tables that contain matrices as nice output in a jupyter notebook.

I seem to not be able to get table to work at all. In particular, if I open a new notebook and run the chunk

%display latex
blah = [('A', 'B', 'C'), (0, 1, 2), (3, 4, 5), (6, 7, 8)]
table(blah)

It returns

PGRpdiBjbGFzcz0ibm90cnVuY2F0ZSI+Cjx0YWJsZSAgY2xhc3M9InRhYmxlX2Zvcm0iPgo8dGJvZHk+Cjx0ciBjbGFzcyA9InJvdy1hIj4KPHRkPkE8L3RkPgo8dGQ+QjwvdGQ+Cjx0ZD5DPC90ZD4KPC90cj4KPHRyIGNsYXNzID0icm93LWIiPgo8dGQ+PHNjcmlwdCB0eXBlPSJtYXRoL3RleCI+MDwvc2NyaXB0PjwvdGQ+Cjx0ZD48c2NyaXB0IHR5cGU9Im1hdGgvdGV4Ij4xPC9zY3JpcHQ+PC90ZD4KPHRkPjxzY3JpcHQgdHlwZT0ibWF0aC90ZXgiPjI8L3NjcmlwdD48L3RkPgo8L3RyPgo8dHIgY2xhc3MgPSJyb3ctYSI+Cjx0ZD48c2NyaXB0IHR5cGU9Im1hdGgvdGV4Ij4zPC9zY3JpcHQ+PC90ZD4KPHRkPjxzY3JpcHQgdHlwZT0ibWF0aC90ZXgiPjQ8L3NjcmlwdD48L3RkPgo8dGQ+PHNjcmlwdCB0eXBlPSJtYXRoL3RleCI+NTwvc2NyaXB0PjwvdGQ+CjwvdHI+Cjx0ciBjbGFzcyA9InJvdy1iIj4KPHRkPjxzY3JpcHQgdHlwZT0ibWF0aC90ZXgiPjY8L3NjcmlwdD48L3RkPgo8dGQ+PHNjcmlwdCB0eXBlPSJtYXRoL3RleCI+Nzwvc2NyaXB0PjwvdGQ+Cjx0ZD48c2NyaXB0IHR5cGU9Im1hdGgvdGV4Ij44PC9zY3JpcHQ+PC90ZD4KPC90cj4KPC90Ym9keT4KPC90YWJsZT4KPC9kaXY+

which appears to be some sort of hash value? I can't find anything on this to help debug.

For reference, I'm still running sage 8.4. The environments on the system I'm working on are a little messed up, so I could update to the newest version if there is reason to believe that's the issue, but I would rather not if I can avoid it.

2018-10-24 04:32:37 +0200 commented answer Cannot get threejs rendering to work on MacOS

Update: I now have installed Sage8.4 and built using python2.7 without using anaconda. Now I can get the threejs viewer working in a sage notebook, and I no longer get ImportError: cannot import name 'THREEJS_DIR' with Offline=False.

However, I still am getting Launched html viewer for Graphics3d Object without any noticeable activity.

2018-10-24 01:29:46 +0200 received badge  Nice Question (source)
2018-10-23 22:03:42 +0200 commented answer Cannot get threejs rendering to work on MacOS

I rebuilt using python2.7 and I'm still having the same issues. The one that I understand the least is why it prints Launched html viewer for Graphics3d Object and then doesn't open anything.

2018-10-22 20:55:18 +0200 received badge  Supporter (source)
2018-10-21 20:41:07 +0200 received badge  Student (source)
2018-10-21 19:12:53 +0200 received badge  Editor (source)
2018-10-21 19:12:48 +0200 asked a question Cannot get threejs rendering to work on MacOS

Hey,

I've been trying to get threejs output working for a few days now. My current installation is from Conda-Forge (sage 8.3) and I'm on MacOS High Sierra (10.13.6).

In the sage repl if I run

P = parametric_plot3d([cos(x),sin(x),x/10], (x,0,4*pi))
P.show(viewer='threejs')

sage raises ImportError: cannot import name 'THREEJS_DIR'. Full output: paste2.org/vP4nBZ9A

If I run

P = parametric_plot3d([cos(x),sin(x),x/10], (x,0,4*pi)
P.show(viewer='threejs', online=True)

sage returns Launched html viewer for Graphics3d Object, but nothing actually happens on my machine. No browser opens, nothing noticeable. I have tried changing the default viewer browser, but it has not made a difference. I'm at a loss as to what is going on here.

Finally, if I run it in a jupyter notebook,

p1 = sphere(color='red', opacity='.5')
p2 = sphere((-1,-1,1), color='cyan', opacity='.3')
p3 = sphere((1,-1,-1), color='yellow', opacity='.7')
show(p1 + p2 + p3, viewer='threejs', online=True)

I get TypeError: a bytes-like object is required, not 'str'. Full traceback here: paste2.org/c1VLUmNm

I've tried pretty hard to diagnose exactly what's going on, but I can't seem to find any recent documentation relating to this issue. My best guess is that the paths are getting messed up because I'm running sage through an anaconda environment. Is there any way to fix this? That being said, I was having similar issues before and wanted to integrate with jupyter which lead to me moving to anaconda. I am going to try and reinstall sage outside of anaconda and see if I can get it to work there, but I figured I should post first because I'm pretty stuck, and having everything in anaconda would be much nicer if possible.