#やりたいこと
python3 -m pip freezeに記載されているバージョンを利用したいが、実行するファイルはsudo権限で実行する必要があり、sudo python3 -m pip freeze に記載されているバージョンで実行されてしまう。
#解決したいこと
・sudo で実行されるコマンドでも sudoを使わない時と同じバージョンを使ってほしい
(sudo pip3 install をすれば、解決はすることは理解)
python3 -m pip freeze の結果
boto==2.44.0 cachetools==3.1.0 certifi==2019.3.9 chardet==3.0.4 Click==7.0 cryptography==1.7.1 distro==1.0.1 Flask==1.0.2 gitdb2==2.0.5 GitPython==2.1.11 google-api-core==1.8.1 google-auth==1.6.3 google-auth-oauthlib==0.2.0 google-cloud-automl==0.1.2 google-cloud-core==0.29.1 google-cloud-storage==1.14.0 google-compute-engine==2.8.13 google-resumable-media==0.3.2 googleapis-common-protos==1.5.8 grpcio==1.19.0 gspread==3.1.0 httplib2==0.12.1 idna==2.8 itsdangerous==1.1.0 Jinja2==2.10 keyring==10.1 keyrings.alt==1.3 MarkupSafe==1.1.1 numpy==1.16.2
#sudo python3 -m pip freeze
boto==2.44.0 chardet==2.3.0 cryptography==1.7.1 distro==1.0.1 google-compute-engine==2.8.13 idna==2.2 keyring==10.1 keyrings.alt==1.3 pyasn1==0.1.9 pycrypto==2.6.1 pygobject==3.22.0 python-apt==1.4.0b3 pyxdg==0.25 requests==2.12.4 SecretStorage==2.3.1 six==1.10.0 unattended-upgrades==0.1 urllib3==1.19.1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。