python modules already loaded on a separate installation of python

10 views
Skip to first unread message

Blues Traggler

unread,
Mar 5, 2021, 2:43:34 PM3/5/21
to sage-support
Hello, 
Configuration:
Macbook Pro, macOS 10.13.6
Sage 9.2 (running after many manipulations that I may describe if someone interested)
Using Jupyter NB

Question : Sage has its own python installation, so modules imported on a separate installation are not known.
One solution is to add in any JupyterNB a first cell containing
import sys
sys.path
sys.path.append('/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages')

Is there a way to add permanently the path without using this trick ?

Thanks,

     Blues

Dima Pasechnik

unread,
Mar 5, 2021, 3:35:26 PM3/5/21
to sage-support
It does not look to me like a good idea to mix modules from different
Python installations.

Sage does not require its own Python, it can be installed into an
existing Python installation
(although this is not yet automated, i.e. you can't just do "pip
unstall sagemath" and magically get Sage in your
Python, it has to be compiled).

Perhaps the quickest way to have Sage integrated into a Python
installation is to use Conda, see
https://github.com/sagemath/sage/blob/develop/src/doc/en/installation/conda.rst


>
> Thanks,
>
> Blues
>
> --
> 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/0d0a0c2c-df81-4996-83ce-7c51941664fan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages