ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 28 Mar 2015 11:59:15 +0100Error setting environment variables by sourcinghttps://ask.sagemath.org/question/26366/error-setting-environment-variables-by-sourcing/ I'm a beginner of unix and struggling with problems. One of them is to run the sage in any directory by typing 'sage'. I have failed even I tried this for 4 hours. Please help me.
I'm using OS X 10.9 but I don't want to use 'alias'. As a practice I want to change PATH to make it.
I have tried
1) adding /Users/jeong/work/Sage/sage-6.4.1/local/bin to /etc/path
using 'vim /etc/paths' I added it to the path. And I closed terminal. After opening it again and typing 'sage'. I got error messages
Error: You must set the SAGE_ROOT environment variable or run this
script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory.
Error setting environment variables by sourcing '/usr/local/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).
Even I change the '/Users/jeong/work/Sage/sage-6.4.1/local/bin' to '/Users/jeong/work/Sage/sage-6.4.1', it doesn't work.
2) making a symbolic link to /usr/local/bin
command: 'ln -s /Users/jeong/work/Sage/sage-6.4.1/local/bin /usr/local/bin'
error messages :
Error: You must set the SAGE_ROOT environment variable or run this
script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory.
Error setting environment variables by sourcing '/usr/local/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).
3) making .bash_profile or changing .profile in the home directory
don't work.
Please help me
Sat, 28 Mar 2015 08:30:24 +0100https://ask.sagemath.org/question/26366/error-setting-environment-variables-by-sourcing/Answer by tmonteil for <p>I'm a beginner of unix and struggling with problems. One of them is to run the sage in any directory by typing 'sage'. I have failed even I tried this for 4 hours. Please help me. </p>
<p>I'm using OS X 10.9 but I don't want to use 'alias'. As a practice I want to change PATH to make it. </p>
<p>I have tried </p>
<p>1) adding /Users/jeong/work/Sage/sage-6.4.1/local/bin to /etc/path
using 'vim /etc/paths' I added it to the path. And I closed terminal. After opening it again and typing 'sage'. I got error messages</p>
<p>Error: You must set the SAGE_ROOT environment variable or run this
script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory.
Error setting environment variables by sourcing '/usr/local/bin/sage-env';
possibly contact sage-devel (see <a href="http://groups.google.com/group/sage-devel">http://groups.google.com/group/sage-d...</a>).</p>
<p>Even I change the '/Users/jeong/work/Sage/sage-6.4.1/local/bin' to '/Users/jeong/work/Sage/sage-6.4.1', it doesn't work. </p>
<p>2) making a symbolic link to /usr/local/bin
command: 'ln -s /Users/jeong/work/Sage/sage-6.4.1/local/bin /usr/local/bin' </p>
<p>error messages : </p>
<p>Error: You must set the SAGE_ROOT environment variable or run this
script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory.
Error setting environment variables by sourcing '/usr/local/bin/sage-env';
possibly contact sage-devel (see <a href="http://groups.google.com/group/sage-devel">http://groups.google.com/group/sage-d...</a>).</p>
<p>3) making .bash_profile or changing .profile in the home directory</p>
<p>don't work.</p>
<p>Please help me </p>
https://ask.sagemath.org/question/26366/error-setting-environment-variables-by-sourcing/?answer=26367#post-id-26367The PATH you have to add is not `/Users/jeong/work/Sage/sage-6.4.1/local/bin`, but `/Users/jeong/work/Sage/sage-6.4.1/`, this is where the sage script belongs to. Then this script will use what is in `/Users/jeong/work/Sage/sage-6.4.1/local/bin`.
Sat, 28 Mar 2015 11:59:15 +0100https://ask.sagemath.org/question/26366/error-setting-environment-variables-by-sourcing/?answer=26367#post-id-26367