仮想環境でpipをアップグレードしようとしています。私は、ubuntu 14.04マシンでvenvburritoラッパーを使用しています。私はそれを更新しようとすると、私は次のエラーを取得する:仮想環境でPIPをアップグレードできません
(virtual_env) [email protected]:~$ pip install pip --upgrade
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.2
Not uninstalling pip at /home/ubuntu/.venvburrito/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg, outside environment /home/ubuntu/.virtualenvs/virtual_env
Successfully installed pip-8.1.2
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
私は、sudoでそれをしようとすると、仮想環境内で、私は次のエラーを取得する:
(virtual_env) [email protected]:~$ sudo pip install --upgrade pip
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/home/ubuntu/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/home/ubuntu/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Requirement already up-to-date: pip in ./.local/lib/python2.7/site-packages
/home/ubuntu/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
私は外でそれを行うと仮想環境では、正しくインストールされます。
ご協力いただければ幸いです。
おかげ
何をしているのか正確にわからない場合は、 'sudo pip'を使わないでください! 'sudo'は環境変数を保存しないので、venvを"中断 "し、ネイティブにインストールされたパッケージと干渉するシステムのPythonインストールを変更することができます。特にvenvsで作業している場合は、sudoでpipを実行する必要はありません。 – mata
ありがとう@mataは、 – Escachator
@SiddheshMhatre素敵な仕事に注意しますが、あなたはpipが自分自身をインストールすることができないkidoのためにその仕事を説明する必要があります。 –