`sage -sh` on Mac

asked 2013-05-25 03:13:05 -0500

updated 2013-05-25 03:17:57 -0500

I got the instruction to use sage -sh to install some PSage modules. However, many environment variables seem to be messed up. It has /usr/local/bin and others prioritized before the Sage dirs.

I manually edited the $PATH variable to update this issue, via set PATH /Applications/sage-5.8/spkg/bin /Applications/sage-5.8/local/bin /usr/bin/ /bin /sbin.

However, now Cython still has problems to find the right module. When starting it, it looks like:

az@ip229 ~/P/psage> cython -h
Traceback (most recent call last):
  File "/Applications/sage-5.8/local/bin/cython", line 7, in <module>
    from Cython.Compiler.Main import main
  File "/Library/Python/2.7/site-packages/Cython-0.18-py2.7-macosx-10.8-x86_64.egg/Cython/Compiler/Main.py", line 17, in <module>
    from Scanning import PyrexScanner, FileSourceDescriptor
ImportError: dlopen(/Library/Python/2.7/site-packages/Cython-0.18-py2.7-macosx-10.8-x86_64.egg/Cython/Compiler/Scanning.so, 2): Symbol not found: _PyUnicodeUCS2_Compare
  Referenced from: /Library/Python/2.7/site-packages/Cython-0.18-py2.7-macosx-10.8-x86_64.egg/Cython/Compiler/Scanning.so
  Expected in: flat namespace
 in /Library/Python/2.7/site-packages/Cython-0.18-py2.7-macosx-10.8-x86_64.egg/Cython/Compiler/Scanning.so

Update: Doing set PYTHONPATH /Applications/sage-5.8/local/lib/python fixed at least this particular problem with Cython.

Is there any suggestion about what I can do to easily overcome these problems?

edit retag flag offensive close merge delete