0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

macのpythonが行方不明になったら

Posted at

事象

me@local:~/repos/aaa$ pipenv install
-bash: /usr/local/bin/pipenv: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory

brewでなんか入れた時にpythonが3.8になって、3.7.7が /usr/local/bin から消えてしまたt。

/usr/local/bin/python*

me@local:~/repos/aaa$ ll /usr/local/bin/python*
lrwxr-xr-x  1 me  admin    39B Apr 30 17:46 /usr/local/bin/python-build@ -> ../Cellar/pyenv/1.2.18/bin/python-build
lrwxr-xr-x  1 me  admin    40B Jul 13 12:09 /usr/local/bin/python3@ -> ../Cellar/python@3.8/3.8.3_2/bin/python3
lrwxr-xr-x  1 me  admin    47B Jul 13 12:09 /usr/local/bin/python3-config@ -> ../Cellar/python@3.8/3.8.3_2/bin/python3-config
lrwxr-xr-x  1 me  admin    42B Jul 13 12:09 /usr/local/bin/python3.8@ -> ../Cellar/python@3.8/3.8.3_2/bin/python3.8
lrwxr-xr-x  1 me  admin    49B Jul 13 12:09 /usr/local/bin/python3.8-config@ -> ../Cellar/python@3.8/3.8.3_2/bin/python3.8-config

なんとなく直った

pyenv install 3.7.7
pyenv global 3.7.7
brew uninstall pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip uninstall pipenv virtualenv
pip install pipenv


よくわからんがこんなんで直ったぽい。python難しい

brewで入れるpipは、pythonをちゃんと探さないんだか、前にあったものの場所を覚えてるんだか。

pip/pipenv/virtualenvが使うpython pathってどうやってかえるんだろ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?