Ask Your Question

ebraminio's profile - activity

2017-08-26 02:59:49 +0200 commented question Cannot use pip because pip is configured with locations that require TLS/SSL

I have the same issue and I have the following, 8, but was available on 7.6 also, macOS, http://mirrors.mit.edu/sage/osx/intel/sage-8.0-OSX_10.12.6-x86_64.app.dmg (http://mirrors.mit.edu/sage/osx/intel...) but I used brew for installing it.

2017-08-23 12:38:47 +0200 answered a question How to use libraries installed in for Python in Sage?

I know this is not considered a clean and good workaround but at least works for me as issuing pip from sage is somehow seem broken for me and my tries for fixing it failed: just put this line on top of your script import sys; sys.path.append('/usr/local/lib/python2.7/site-packages') (or any other appropriate place your python 2 packages are installed), for example see:

~ sage --python
import Python 2.7.13 (default, Mar 25 2017, 16:37:39) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named requests
>>> import sys; sys.path.append('/usr/local/lib/python2.7/site-packages')
>>> 
>>> import requests
>>> 
>>>