
実現したいこと
MacOSに設定しているpython環境を確認して
aws cliをMacOSに再インストールしたい
/Users/exampleuser/Library/Python/3.8/bin/aws
↑を綺麗にアンインストールしたい
環境
MacOS 12.6.3
iTerm 2 Build 3.4.19
% pkgutil --pkg-info=com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables version: 14.2.0.0.1.1668646533
経緯
aws cliコマンドを叩いたところエラーが出ました。
% aws --version Traceback (most recent call last): File "/Users/exampleuser/Library/Python/3.8/bin/aws", line 19, in <module> import awscli.clidriver ModuleNotFoundError: No module named 'awscli'
awsコマンドの所在を確認してみました
% which aws /Users/exampleuser/Library/Python/3.8/bin/aws
pythonのバージョンを確認してみました。
% python --version Python 3.10.7
whichコマンドでpythonを探してみました。
% which python /Users/exampleuser/.pyenv/shims/python
そういえば微かにpyenvをインストールした記憶があり確認してみました。
% pyenv version 3.10.7 (set by /Users/exampleuser/.pyenv/version) % pyenv deactivate pyenv: no such command `deactivate'
pip listを実行したところawsもpythonも出てきませんでした。
brew listを実行したところpyenvとpython@3.10が出てきました。
ソース
% cat /Users/exampleuser/Library/Python/3.8/bin/aws #!/Library/Developer/CommandLineTools/usr/bin/python3 # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # http://aws.amazon.com/apache2.0/ # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License.
質問したいこと
/Users/exampleuser/Library/Python/3.8/bin/aws
↑を綺麗にアンインストールするにはどのような方法がありますでしょうか?
単純にrm -rf /Users/exampleuser/Library/Python/3.8/とすれば問題ないのでしょうか?
また/Users/exampleuser/Library/Python/3.8/bin/awsがアンインストールできたら
brewでaws cliをインストールしようと考えていますが
おすすめの方法があれば知りたいです。
補足情報
pythonはたまに触ったり学習したりしている感じなので
仮想環境がいまいちよくわかっておりません。
pythonのインストール方法ですが記憶が曖昧で恐縮なのですが
おそらくIntel MacからLibraryディレクトリをまるっとコピーして
現在のM1Macに移動したような気がします。



回答1件
あなたの回答
tips
プレビュー