I have MacOS Catalina and I went ahead and did a brew install
for the latest version of python
3.8.5. Then I discovered pyenv
and installed that as well. I followed the steps on https://github.com/pyenv/pyenv#basic-github-checkout from number 3 but still can't see any python versions in pyenv
.
I have both .zprofile and .zshrc files and am wondering if that's causing issues. Here's my echo $PATH
-
/Users/pq0252/.pyenv/shims/shims:/Users/pq0252/.pyenv/shims/shims:/Users/pq0252/.pyenv/shims:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Here's the pyenv version output:
pyenv versions
* system (set by /Users/pq0252/.pyenv/shims/version)
Here's the .zprofile
contents -
#Setting PATH for Python 3.8.
#The original version is saved in .zprofile.pysave.
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH
Here's the .zshrc
contents (this seems to be repeating the if
condition, even though I only added it once which I am thinking has something to do with the step 3 on pyenv
github where we are appending to it?).
export PYENV_ROOT="$HOME/.pyenv/shims"
export PATH="$PYENV_ROOT:$PATH"
export PIPENV_PYTHON="$PYENV_ROOT/python"
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\n$
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
Should I remove entries in .zshrc
and instead add everything to .zprofile
or is there something else I'm missing? python3 --version
does show 3.8.5.