我想在我的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