[sage-support] Re: How to create a new virtual environment based on an existing sage installation
The particular error that you are running into comes from Singular not being in PATH. Use "sage -sh" to enter a shell in which SAGE_LOCAL/bin has been added to PATH. Then you can activate the venv as you did before. On Tuesday, March 1, 2022 at 10:45:00 AM UTC-8 m.derick...@gmail.com wrote: > Hi All, > > I am wondering what the best way is to create a new virtual environment > where I can import stuff from an already existing sage installation: > > I tried the following using sage 9.5.beta9 > > $ sage -python3 -m venv --system-site-packages venv > $ source venv/bin/activate > (venv) $ python3 > Python 3.9.9 (main, Dec 25 2021, 18:25:51) > [GCC 9.3.0] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> from sage.all import * > Traceback (most recent call last): > File "", line 1, in > File > "/scratch/home/mderickx/sages/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/all.py", > > line 126, in > from sage.rings.all import * > File > "/scratch/home/mderickx/sages/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/all.py", > > line 87, in > ... > ... > File "sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 1, in > init sage.rings.polynomial.multi_polynomial_libsingular > (build/cythonized/sage/rings/polynomial/multi_polynomial_libsingular.cpp:50020) > > > File "sage/libs/singular/singular.pyx", line 1558, in init > sage.libs.singular.singular > (build/cythonized/sage/libs/singular/singular.cpp:15747) > File "sage/libs/singular/singular.pyx", line 1525, in > sage.libs.singular.singular.init_libsingular > (build/cythonized/sage/libs/singular/singular.cpp:12865) > File > "/scratch/home/mderickx/sages/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/posixpath.py", > > line 152, in dirname > p = os.fspath(p) > TypeError: expected str, bytes or os.PathLike object, not NoneType > > But as you can see this new venv is not created in such a way that sage > the library is useable (probably because certain sage related environment > variables are not set). > > So what is the best way to get around this? -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/f3a37677-442c-4953-aa06-e2dda8118c4cn%40googlegroups.com.
[sage-support] How to create a new virtual environment based on an existing sage installation
Hi All, I am wondering what the best way is to create a new virtual environment where I can import stuff from an already existing sage installation: I tried the following using sage 9.5.beta9 $ sage -python3 -m venv --system-site-packages venv $ source venv/bin/activate (venv) $ python3 Python 3.9.9 (main, Dec 25 2021, 18:25:51) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from sage.all import * Traceback (most recent call last): File "", line 1, in File "/scratch/home/mderickx/sages/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/all.py", line 126, in from sage.rings.all import * File "/scratch/home/mderickx/sages/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/all.py", line 87, in ... ... File "sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 1, in init sage.rings.polynomial.multi_polynomial_libsingular (build/cythonized/sage/rings/polynomial/multi_polynomial_libsingular.cpp:50020) File "sage/libs/singular/singular.pyx", line 1558, in init sage.libs.singular.singular (build/cythonized/sage/libs/singular/singular.cpp:15747) File "sage/libs/singular/singular.pyx", line 1525, in sage.libs.singular.singular.init_libsingular (build/cythonized/sage/libs/singular/singular.cpp:12865) File "/scratch/home/mderickx/sages/sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/posixpath.py", line 152, in dirname p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType But as you can see this new venv is not created in such a way that sage the library is useable (probably because certain sage related environment variables are not set). So what is the best way to get around this? -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/972ae225-4f6e-4088-8cbf-fa1320684d40n%40googlegroups.com.
Re: [sage-support] nonlinear equation system
Thanks all. I believe Dima is correct. These are inconsistent. On Monday, February 28, 2022 at 1:59:58 AM UTC-8 dim...@gmail.com wrote: > On Mon, Feb 28, 2022 at 7:24 AM cyrille@univ-orleans.fr > wrote: > > > > I am not a mathematician but what seems obvious is that you have 8 > equations with 8 variables. You could conjecture there is at least a real > solution even if there could be 8. But, your system is highly nonlinear. > > Generically, one might expect up to 2^8 solutions here (8 variables, 8 > equations of degree 2). > This is called Bezout theorem. > No guarantee that any solution is real, though. > > > > So you can not expect a solution by quadrature. You must try to solve > you system numerically. > > > > > > - Mail d’origine - > > De: Scott Wilson > > À: sage-support > > Envoyé: Sun, 27 Feb 2022 20:40:43 +0100 (CET) > > Objet: [sage-support] nonlinear equation system > > > > Hello, I am new to sage math and tried to get the solution to the > following nonlinear equation system. Sage has been working on this since > yesterday and I am wondering how long I should typically wait. All comments > are appreciated. Thanks in advance. > > > > var('A B E F I J R T') > > > > eq1 = A*E-B^2-B*F+E^2==1 > > eq4 = A*I-B*J+I^2+R^2==-1/2 > > eq5 = A*R-B*T+2*R*I==0 > > eq6 = B*I-E*J+I*J+R*T==0 > > eq8 = -B*R+E*T-R*J-I*T==0 > > eq9 = E*I-F*J+J^2+T^2==1/2 > > eq11 = -E*R+F*T-2*T*J==0 > > eq12 = I^2-R^2-J^2+T^2==-1 > > > > solve([eq1,eq4,eq5,eq6,eq8,eq9,eq11,eq12],A,B,E,F,I,J,R,T) > > > > > > > > > > -- > > > > 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...@googlegroups.com. > > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/47695a04-777d-4fbb-af5d-7371db01a31an%40googlegroups.com > . > > > > > > -- > > 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...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/599338425.36980299.1646033057570.JavaMail.zimbra%40univ-orleans.fr > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/18f9e7a9-67d7-48fa-bd55-a4ace0e48bcen%40googlegroups.com.