我想在我的Mac TensorFlow升級六點,我所做的:無法在Mac OS X中的優勝美地升級6
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'可能被設置爲使用與可執行'pip'不同的Python可執行文件。因此'pip'安裝一個Python版本,而'IPython'則運行另一個Python版本。看看你的'pip'腳本和'ipython'腳本的第一行,看看它們指向哪個Python可執行文件。 – Evert
好的你是對的。在'python'中檢查pip .__ version__讓我獲得1.10.0和TensorFlow的預期功能。我如何確保iPython正在調用適當的六個版本?這個ipython腳本在哪裏? – chibro2
你可以通過鍵入'which ipython'或'type ipython'找到'IPython'腳本。那麼它將取決於你是否想要使用IPython正在使用的Python可執行文件(因此,爲該Python安裝'six'),或者你想要改變'ipython'腳本的第一行。但是請注意,那麼可能找不到模塊,或者可能找不到IPython本身。 – Evert