-bash: alias: `export PATH': invalid alias name after installation of pyenv
Hi, after installing pyenv via Homebrew (on OSX Sierra) and following further installation instructions, like adding eval "$(pyenv init -)" to bash_profile, I end up with the following: '-bash: alias: `export PATH': invalid alias name' when starting a new shell (or running ~/.bash_profile). Running echo $PATH works as expected. Any idea what to look for to suppress this message.
Thanks
Please show the relevant part of your bash profile file. You might be missing a newline?!
Thanks for picking up on this so quickly!
#PATH export PATH="/usr/local/bin:/usr/bin:/bin:JENV_ROOT=/usr/local/var/jenv:$PATH"
#PYENV export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then export PATH="${PYENV_ROOT}/bin:${PATH}" eval "$(pyenv init -)" fi
#PYENV-VIRTUALENV eval "$(pyenv virtualenv-init -)" export PYENV_VIRTUALENV_DISABLE_PROMPT=1
Looks ok.
You can put set -x before (and set +x after) this block to see what gets executed before the error.
Maybe you also have something in bashrc?!
Also make sure that the error goes away when you comment/remove this block etc.
Blueyed, that solved the problem. Many thanks for your assistance!
@laurent101 What exactly solved it? :)
@laurent101 I would really appreciate some feedback here..
Really sorry about the late reply. I was offline for a couple of days. Running source ~/.bash_profile with set -x /+x I discovered there was a typo in the command line for eliminating duplicates in PATH.