@wpeter11 Hi, I'm happy to know it helps you, if you want it would be a good thing to write a "thank you" mail to Andrey, that works continuously on SageMathCell (William A. Stein is the founder of SageMath). A lot of people work on it.

Obviously it is not so convenient to compile (yes sagemathcell allows you to compile and run C and Fortran codes and to use common Linux shell commands like ls with !ls, for example) every time a python lib, but you can do it the first time, create a zip folder with all compiled (for Linux) libraries, download the zip to upload it in your preferred cloud service (dropbox, github, ....), and create a python script that, when you need it, allows you to download in a math session of sagemathcell your zipped compiled library (with dependencies), extract it and use it. If you have limit about length of your code, you can save it in a file, copy the file in cloud service, download it when you need and open it to read content in sage server (without sending the full code to server by inserting the text in the cell).

I don't know if with python script sage_interface user can do several calculations maintaining the same temporary/sandboxed folder created by sagemathcell. I think it is possible but some tests are required. For now every time you run a script sent to the server, sage_interface creates each time a new cell (that is: a new different temp folder in the server machines, and that folder is visible only by you, in theory). This means that you should download or compile every time what you want, also for simple tests.

@JonB Hi, yes it is a nice thing, I discovered it a short time ago when I was doing tests on file creation in sagemathcell temp folders. It is possibile to use pip and it seems to call automatically gcc/fortran compiler if needed (gcc available as a built-in package). Only for Linux. It is like to have in Pythonista a free Linux virtual machine available online.

Regards