after I installed Anaconda package on the server, I'm then trying source ~/.bashrc
to set env variable, but it raise an error of export: Command not found
, my .bashrc
file is like this:
# added by Anaconda3 4.2.0 installer
export PATH="/projdata3/info_fil/wangtao/conda/bin:$PATH"
can anyone help? thanks very much!
Since you're using tcsh
, not bash
, you should edit your .cshrc
and add the line:
set path = ( /projdata3/info_fil/wangtao/conda/bin $path )
Then use source .cshrc
.
If your shell is .csh
please use setenv
to export a variable which in bash you would normally do with export
In bash
, export My_VARIABLE=/some/location/or/.something/
In csh
shell, it would be setenv My_VARIABLE /some/location/or/.something/
If echo $SHELL
command is giving /usr/local/bin/tcsh
then it means you are working in csh shell.
In csh shell, if you want to set environment variables, the syntax goes like this
setenv <variable_name> <variable_value>
Here is the useful csh commands link for reference
If you want to enter bash shell from csh shell, enter command bash
Then this command will work: export <variable_name>=<variable_value>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.