Я пытаюсь обновить шесть на моем компьютере для TensorFlow, и я сделал:Не удается обновить шесть на Mac OS X Yosemite
sudo pip install --ignore-installed six
И я получаю:
The directory '/Users/lingxiao/Library/Caches/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 '/Users/lingxiao/Library/Caches/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.
Collecting six
/Library/Python/2.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
/Library/Python/2.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
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six
Successfully installed six-1.10.0
Дело в том, что он заканчивается успешно установленной. Но когда я перехожу к интерпретатору ipython:
import six
six.__version__
Я все еще вижу 1.4.1. Каково решение?
Возможно, ваш IPython установлен на использование другого исполняемого файла Python, чем использует исполняемый 'pip'. Таким образом, 'pip' устанавливает одну версию Python, а' IPython' запускается с другой версией Python. Посмотрите на первую строку как на ваш скрипт 'pip', так и на ваш скрипт' ipython', и посмотрите, на какие Python-файлы они указывают. – Evert
ОК, вы правы. check pip .__ version__ в просто 'python' получает меня 1.10.0 и TensorFlow работает, как ожидалось. Как я могу убедиться, что iPython вызывает соответствующую шестую версию? где этот скрипт ipython? – chibro2
Возможно, вы можете найти скрипт 'IPython', набрав' какой ipython' или 'type ipython'. Тогда это будет зависеть от того, хотите ли вы использовать исполняемый файл Python, который использует IPython (в этой причине, установить «шесть» для этого Python), или вы хотите изменить первую строку в скрипте 'ipython' , Однако имейте в виду, что тогда либо модули не могут быть найдены, либо сам IPython не может быть найден. – Evert