Ask Your Question

Revision history [back]

`sage -sh` on Mac

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.

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

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

`sage -sh` on Mac

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.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?