Search code examples
numpyptvs

PTVS 2015 Numpy Install


I am attempting to use the dialog box to install numpy in a VS2015 Python 2.7 project like so:

enter image description here

When I run it, I get the following message:

You are using pip version 6.1.1, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
C:\Python27\lib\site-packages\pip-6.1.1-py2.7.egg\pip\_vendor\requests\packages\urllib3\util\ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
    Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\dixon\\appdata\\local\\temp\\pip-build-rmjkhk\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\dixon\appdata\local\temp\pip-fxbttw-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\dixon\appdata\local\temp\pip-build-rmjkhk\numpy
'numpy' failed to install. Exit code: 1

I am not sure why I would need a different SSL context? Do I need to install another cert?


Solution

  • numpy does not currently pip install on Windows for a huge range of reasons, none of which PTVS can fix for you.

    Edit: numpy recently uploaded wheels for Windows, so pip install will work. However, you will need to be careful when installing other prebuilt packages that depend on numpy, as there are strict compatibility constraints that will not be enforced by pip. The general recommendation is still to install Anaconda instead of python.org Python if you need a full set of scientific packages.

    The SSL warning probably indicates that you have Python 2.7.8 or earlier. Later versions of 2.7 included improved (i.e. working) SSL support that helps ensure your connections are not being hijacked.