ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 06 Nov 2016 09:34:37 -0600Importing Python packages into Sage or Vice Versahttp://ask.sagemath.org/question/35457/importing-python-packages-into-sage-or-vice-versa/ Hi all,
this is my first post. I'm a long time user of Python, and I'm fairly new to Sage. I'm using Ubuntu, if this helps. Currently, python doesn't recognize any of Sage's packages, and Sage can't import even standard Python packages like pandas.
I've looked at various instructions online about how to import sage packages into python and vice versa, but they all seem incredibly intricate, and none of them seem to work for me.
Here are a few attempts that I made:
1. Running "sudo sagemath --python -m easy_install pandas" in terminal. (Still can't import pandas while running sage; even after running: "sys.path.append('/usr/lib/sagemath/local/lib/python2.7/site-packages/pandas-0.19.1-py2.7-linux-x86_64.egg')" from within sage.)
2. Following the instructions in the "import sage packages in python" question. (I don't have enough karma to post links.)
3. Doing various bizzarre attempts at changing sage_root or adding to it my python path.
4. Attempting to import pip while running sage, and install pandas this way. (Can't import pip.)
I tried a few more things (like downloading packages and "build"ing them, and then doing a few more very technical and annoying things), and all of my attempts fail. Is there really no simple way to do this? What is the most fool-proof way to do this that exists? It would be enormously helpful for me to be able to use python packages while working in sage, or vice versa.AndrewSun, 06 Nov 2016 09:34:37 -0600http://ask.sagemath.org/question/35457/