本文解决两个问题: 安装pip8.1.1后无法升级至9.0.1和scipy.0.18.whl is not a supported wheel on this platform
使用pip安装下载好的scipy.0.18.whl
pip install scipy.0.18.whl
报错: scipy.0.18.whl is not a supported wheel on this platform 我以为是pip的不兼容,于是升级了pip
sudo pip install –upgrade
升级失败 于是手动下载了pip-9.0.1.tar.gz
tar -zxvf pip-9.0.1.tar.gz cd pip-9.0.1 sudo python setup.py install sudo pip install scipy.0.18.whl
报错:
The directory '/home/x/.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/x/.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. scipy-0.18.1-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform. /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/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 /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/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问题没有解决,而且还因为升级了pip9.0.1出现了新的问题 针对pip安装出现
The directory '/home/x/.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.网上的解决办法是
sudo -H pip install…
这个时候查看pip版本还是8.1.1,在/home/mt/anaconda2/bin目录下,有个easy_install-2.7,输入命令easy_install-2.7 pip==9.0.1,成功将版本变为了9.0.1
由于我的python是用Anaconda安装的,所以直接使用conda升级scipy是最简单最有效的办法
conda update scipy
等到升级完就成功安装了scipy.0.18