How can I correct my export PATH from Pipenv video?

Sorry, I hadn’t really read that properly the first time, I was just focused on the error. Yes that’s not ideal, definitely a broken PATH. Your code prevents any expansion of the existing PATH at the minute, you need both parameter expansion for the existing path $PATH instead of just the plain text PATH and the quoting should be weak quoting or less, e.g. "stuff" instead of strong quoting 'stuff' as strong quotes disallow the expansion too.

Probably something like this-
export="/Users/trinidadbosch/Library/Python/3.9/bin:$PATH"

Oh ouch, when I try running the ‘vi’ code it doesn’t work so I can’t modify the whole PATH code (help :cold_sweat:).

Last login: Fri May 28 19:08:18 on ttys000

-bash: dirname: command not found

-bash: dirname: command not found

-bash: dirname: command not found

-bash: dirname: command not found

(base) MacBook-Pro-de-Trinidad:~ trinidadbosch$ vi ~/.bash_profile

-bash: vi: command not found

Maybe just open it with the textedit app or similar GUI tool.

If you know the correct path to vi probably /usr/bin/vi or something you could use that if you really wanted to.

I plugged it on my terminal and I’ve got this

~ VIM - Vi IMproved
~
~ version 8.0.1283
~ by Bram Moolenaar et al.
~ Vim is open source and freely distributable
~
~ Become a registered Vim user!
~ type :help register for information
~
~ type :q to exit
~ type :help or for on-line help
~ type :help version8 for version info
~
~
~

Hey! I was able to open .bash_profile on textedit but I’m not sure what to change to get rid of the “-bash: dirname: command not found”, can you please help me a bit? This is what is in the file

export PATH="/Users/trinidadbosch/Library/Python/3.9/bin:PATH"

Setting PATH for Python 3.8

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH

Setting PATH for Python 3.8

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH

alias python=“python3”
alias pip=“pip3”

Setting PATH for Python 3.9

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
export PATH

>>> conda initialize >>>

!! Contents within this block are managed by ‘conda init’ !!

__conda_setup="$(’/Users/trinidadbosch/opt/anaconda3/bin/conda’ ‘shell.bash’ ‘hook’ 2> /dev/null)"
if [ $? -eq 0 ]; then
eval “$__conda_setup”
else
if [ -f “/Users/trinidadbosch/opt/anaconda3/etc/profile.d/conda.sh” ]; then
. “/Users/trinidadbosch/opt/anaconda3/etc/profile.d/conda.sh”
else
export PATH="/Users/trinidadbosch/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup

<<< conda initialize <<<

Hey!! I fixed it, I went to your comment in Feb 1st and I followed it and now my terminal is working without any weird message.

THANKS!

2 Likes

Hi mate! Me again hahaha I was working on my terminal and when I type the “ls” I’m getting

-bash: ls: command not found

Any idea on what could be causing this error on my PATH? Here is what it contains.

export PATH="/Users/trinidadbosch/Library/Python/3.9/bin:PATH"

Setting PATH for Python 3.8

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH

Setting PATH for Python 3.8

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH

alias python=“python3”
alias pip=“pip3”

Setting PATH for Python 3.9

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
export PATH

>>> conda initialize >>>

<<< conda initialize <<<

At a guess, the same line we discussed before :thinking: How can I correct my export PATH from Pipenv video? - #16 by tgrtim

Fixed :slight_smile:
PATH was without the $ symbol.

Thanks!!!
ps: any recommendation where to read about PATH to have a better understanding of it?

Hmm, OSX often has some minor quirks (relative to other UNIX based/inspired systems) so I’d suggest a web search for it and PATH. Something like the following might be helpful- https://unix.stackexchange.com/q/111550 but it depends on how much you already know.

Getting in the habit of hunting down such information is a skill in itself and a large part of many folks workflow, you’ll soon form your own opinion about where the best source of information for you personally is.