.bash-profile

Mac using default Python despite Anaconda install

社会主义新天地 提交于 2019-12-03 01:21:46
问题 I am running Mac 10.9 Mavericks and have installed Anaconda. However, despite that, when I access python via terminal, I still get the default Apple version: Python 2.7.5 (default, Sep 2 2013, 05:24:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin My .bash_profile is this: export PATH="$HOME/anaconda/bin:$PATH" MONGO_PATH=/usr/local/mongodb/bin SQL_PATH=/usr/local/mysql export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$PATH" Is there anything I can do to use the

Reload .profile in bash shell script (in unix)?

馋奶兔 提交于 2019-12-03 00:42:45
问题 I'm new to bash shell scripting, and have come across a challenge. I know I can reload my ".profile" file by just doing: . .profile but I'm trying to execute the same in a bash script I'm writing and it is just not working. Any ideas? Anything else I can provide to clarify? Thanks 回答1: Try this to reload your current shell: source ~/.profile 回答2: Try this: cd source .bash_profile 回答3: The bash script runs in a separate subshell. In order to make this work you will need to source this other

How to remove entry from $PATH on mac

陌路散爱 提交于 2019-12-03 00:20:43
问题 I was trying to install Sencha Touch SDK tools 2.0.0 but could not run it properly. It created an entry in the $PATH variable. Later I deleted the sencha sdk tools folder but didn't realize that the path variable is still there. When i did echo $PATH I got - /Applications/SenchaSDKTools-2.0.0-beta3:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin I searched on how to remove variables from $PATH and followed these steps : Gave the command PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local

Bash prompt history issue

怎甘沉沦 提交于 2019-12-02 23:24:01
This is a weird one that I haven't been able to find a good answer with Google (of course there's always the possibility that I just fail at that). On my bash prompt, if I color a part of the prompt, when I hit 'up' to go to a previous command, I can't go to the start of the line after it's past a certain amount of characters (specifically 31). My current bash prompt is this: (colors are defined earlier in my .bashrc) PS1="[\u@$cyan\h$NC \w] " But if I change it to this: PS1="[\u@\h \w] " It no longer prevents me from going to the beginning of the line. The odd part, is visually, when I hit

RVM Warning! PATH is not properly set up

拥有回忆 提交于 2019-12-02 15:51:36
I just installed rvm on my mac, but I receive this warning on global commands Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-1.9.3-p194/bin' is not at first place, usually this is caused by shell initialization files - check them for 'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p194'. My $PATHS confirms the warning: $echo :$PATH: :/usr/local/rvm/bin:/usr/local/heroku/bin:/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global

Mac using default Python despite Anaconda install

主宰稳场 提交于 2019-12-02 15:09:42
I am running Mac 10.9 Mavericks and have installed Anaconda. However, despite that, when I access python via terminal, I still get the default Apple version: Python 2.7.5 (default, Sep 2 2013, 05:24:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin My .bash_profile is this: export PATH="$HOME/anaconda/bin:$PATH" MONGO_PATH=/usr/local/mongodb/bin SQL_PATH=/usr/local/mysql export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$PATH" Is there anything I can do to use the Anaconda version of Python? At a loss at the moment. Thank you The first matching executable is the one

/usr/bin/env bad interpreter

眉间皱痕 提交于 2019-12-02 13:58:06
问题 Trying to get Amazon's EC2 command line tools to work. This is what my .bash_profile looks like. I get the error: /users/zmjones/.ec2/bin/ec2-add-keypair: /usr/bin/env: bad interpreter: Operation not permitted PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:$PATH PATH=/opt/local/sbin:/usr/local/bin:/usr/x11/bin:/usr/texbin:$PATH PATH=/usr/local/texlive/2011/bin/x86_64-darwin:$PATH PATH=/Library/Frameworks/EPD64.framework/Versions/Current/bin:$PATH EC2_HOME=~/.ec2 PATH=$PATH:$EC2_HOME/bin

Cannot find main class on Linux - Classpath issue

假装没事ソ 提交于 2019-12-02 09:21:52
I am having some trouble running a few jar's on a linux box. Basically, I am getting an error saying it cannot find the main class of my main jar. The class is defenetly present so it must be a classpath issue. I am not great with linux, so I am looking for some advice as to where I might be missing something. First off, I am setting the classpath in the users bash_profile; adding all the jar's required, seperated by a : delimeter. I then export the classpath. Then, in the shell (ksh) script I use to invoke the main jar, I also st the classpath and call it in the command using -cp so it looks

bash_profile is not taking effect with chef-run

梦想的初衷 提交于 2019-12-02 07:24:20
If I run the below recipe with chef, entries are getting added in ~/.bash_profile , but when I do echo $PATH or echo $JAVA_HOME , the command line returns blank values. What's going on there? ruby_block "set-env-java-home" do block do ENV["JAVA_HOME"] = node['java']['path'] ENV['PATH'] = "#{ENV['PATH']}:#{node['java']['path']}/bin" end not_if { $JAVA_HOME == "#{ENV['JAVA_HOME']}" && $PATH = "#{ENV['PATH']}:#{node['java']['path']}/bin" } end bash 'set-env-bashrc' do code <<-EOH echo -e "export JAVA_HOME=$JAVA_HOME" >> ~/.bash_profile echo -e "export PATH=$PATH" >> ~/.bash_profile source ~/.bash

bash_profile is not taking effect with chef-run

痞子三分冷 提交于 2019-12-02 06:52:34
问题 If I run the below recipe with chef, entries are getting added in ~/.bash_profile , but when I do echo $PATH or echo $JAVA_HOME , the command line returns blank values. What's going on there? ruby_block "set-env-java-home" do block do ENV["JAVA_HOME"] = node['java']['path'] ENV['PATH'] = "#{ENV['PATH']}:#{node['java']['path']}/bin" end not_if { $JAVA_HOME == "#{ENV['JAVA_HOME']}" && $PATH = "#{ENV['PATH']}:#{node['java']['path']}/bin" } end bash 'set-env-bashrc' do code <<-EOH echo -e "export