After changing the account name of mac, pip and ipython installed by pyenv can no longer be used, so I can use it after reinstalling python.
macOS Catalina 10.15.4 Homebrew 2.2.11 pyenv 1.2.17 python 3.8.0
I used brew to install pyenv on my mac, and then installed and used python on that pyenv. After that, I changed the mac account name (and home directory name) for various reasons. To change the account name, follow the Official Description. The change itself worked fine, but when I ran pip or ipython I got the following error and it became unusable.
>> ipython
/usr/local/Cellar/pyenv/1.2.17/pyenv.d/exec/pip-rehash/pip: /Users/[new home directory name]/.pyenv/versions/3.8.0/bin/pip: /Users/[old home directory name]/.pyenv/versions/3.8.0/bin/python3.8: bad interpreter: No such file or directory
It seems that I'm angry when I go looking for python with the old home directory name and can't find it. I think there are some old settings left, but I often wonder where "/Users/[old home directory name] /.pyenv/versions/3.8.0/bin/python3.8" is defined. I didn't know, so I gave up and reinstalled python 3.8.0 with pyenv and it was cured.
pyenv uninstall 3.8.0
pyenv install 3.8.0
Recommended Posts