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.Sun, 16 Oct 2011 15:16:14 +0200Can I copy sage library to my program folder and..https://ask.sagemath.org/question/8385/can-i-copy-sage-library-to-my-program-folder-and/I build *program.py* that must use **some** math function ie. **IntegerModRing**,.. and i don't want to use **"from sage.all import *"** cause it will run sage first to import library
Can I copy sage library to my program folder and just use "from path/to/*myprogram.py* import *" or it have another way
ps. Reason i don't want to run sage is i want to create *program.py* to pure program that use/import sage-lib **not** program that must install/run sage first before use.
thank you very muchSun, 16 Oct 2011 13:24:26 +0200https://ask.sagemath.org/question/8385/can-i-copy-sage-library-to-my-program-folder-and/Answer by Mike Hansen for <p>I build <em>program.py</em> that must use <strong>some</strong> math function ie. <strong>IntegerModRing</strong>,.. and i don't want to use <strong>"from sage.all import *"</strong> cause it will run sage first to import library</p>
<p>Can I copy sage library to my program folder and just use "from path/to/<em>myprogram.py</em> import *" or it have another way</p>
<p>ps. Reason i don't want to run sage is i want to create <em>program.py</em> to pure program that use/import sage-lib <strong>not</strong> program that must install/run sage first before use. </p>
<p>thank you very much</p>
https://ask.sagemath.org/question/8385/can-i-copy-sage-library-to-my-program-folder-and/?answer=12766#post-id-12766No, you can't just copy the Sage (Python) library to another folder and expect things to work. Sage comes with a bunch of C libraries and external programs that it needs to work. Basically you'd need to redistribute Sage in order for `program.py` to properly run.Sun, 16 Oct 2011 15:16:14 +0200https://ask.sagemath.org/question/8385/can-i-copy-sage-library-to-my-program-folder-and/?answer=12766#post-id-12766