Check the installation of Python 2.7, and then install/reinstall pip which is described here. Then a open command line windows and write:

pip install numpy

Or

pip install scipy

If already installed, try this:

pip install -U numpy
Answer from acs on Stack Overflow

Check the installation of Python 2.7, and then install/reinstall pip which is described here. Then a open command line windows and write:

pip install numpy

Or

pip install scipy

If already installed, try this:

pip install -U numpy
Answer from acs on Stack Overflow
🌐
NumPy
numpy.org › install
NumPy - Installing NumPy
conda create -n my-env conda activate my-env conda install numpy ... python -m venv my-env source my-env/bin/activate # macOS/Linux my-env\Scripts\activate # Windows pip install numpy
Discussions

How to Install Numpy
open command prompt pip install numpy More on reddit.com
🌐 r/learnpython
42
6
June 10, 2025
How to install NumPy using official python IDLE? - Stack Overflow
As seen in the title, I need some help installing NumPy using the official python IDLE. I am running Windows 10 on a Dell computer and I am not sure where to start. I have read through a very similar More on stackoverflow.com
🌐 stackoverflow.com
Install python on windows 10 experience is horrible -- how do i get numpy?
so i down load the 3.8.1 installer run it ok, looks good try some code. numpy is missing. get a cmd window “python pip install numpy --user” doesn’t find pip so, python.org installer doesn’t install a working configuration. i tell myself, keep it professional, self,… but i am surprised ... More on discuss.python.org
🌐 discuss.python.org
0
1
January 16, 2020
python - Installing NumPy on Windows - Stack Overflow
Then there are basically two ways to install Python packages: ... The first case, you tried it with the command pip install numpy, but since this package contains native code, it requires development tools to be installed properly (which I always found to be a pain in the neck to do on Windows, but ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-numpy-on-windows
How to Install Numpy on Windows? - GeeksforGeeks
January 31, 2026 - NumPy is a core Python library for numerical computing. On Windows, it can be installed easily using either pip or conda, depending on your Python environment.
🌐
Reddit
reddit.com › r/learnpython › how to install numpy
r/learnpython on Reddit: How to Install Numpy
June 10, 2025 -

A coworker sent me a Python file that uses numpy, so when I tried to run it, I got the error "No module named 'numpy'". So I looked up numpy, and it said in order to get that, I needed either conda or pip. so I looked up how to get conda, and it said I had to first download Anaconda. So I download Anaconda. I look in there and it would seem to me that both conda and numpy are already in there: Under Environments, both conda and numpy are listed as installed. But then I went back and tried to run the program again, and I got the same error. What else do I need to do to access numpy?

Also, idk if this matters, but I'm running Python on IDLE. Do I need to use a different IDE?

Top answer
1 of 11
45
open command prompt pip install numpy
2 of 11
4
Couple of options. Are you on windows? I'll just assume windows for now. You can run the script in the conda environment, base, created when you installed anaconda. Typically this is like, open the anaconda navigator. Select command prompt or powershell. Or, skip the navigator and just search your computer for "Anaconda prompt", which should open a terminal with base activated already. Then, you should see the (base) prefix left of the terminal interface. You can start from any sort of terminal, and activate the (base) environment activation script as well. What the activation script essentially does is it sets some temporary variables in your terminal to tell your computer which special folders to search for certain binaries (like python) / packages / libraries. The other method is if you have a global python install, you already have a global pip. This would've worked without anaconda. open cmd and run pip install numpy If you're in a locked-down coorporate environment, you may have some issues, but otherwise this is what you needed. You can also use the venv module to create virtual environments (similar to conda environments, but not 100% the same). They just let you keep different projects with different requirements, or different version requirements, isolated in their own 'virtual' environment. These typically install the dependencies in the same project folder, next to your code. whereas conda has a hidden folder somewhere with all your environments. I've been enjoying uv for managing different python virtual environments. It's another binary you install, but it lets you quickly create virtual environments, specify the python version, pin dependencies (like numpy in your case) and install them into your virtual environments. uv sort of keeps track of everything you use it, not quite like conda. If this is the only use of python you have, is running this one script, then you really can just run it all in a global python install and not worry about virtual environments. But it's good to know the what and why.
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install numpy
How to Install NumPy (Windows, Linux and MacOS)
December 12, 2025 - Install PIP on Windows. Install PIP on macOS. 3. Use PIP to install NumPy. Run the following command: ... Wait for the installation to complete. Note: This method installs NumPy globally.
🌐
PyPI
pypi.org › project › numpy
numpy · PyPI
If you are new to contributing to open source, this guide helps explain why, what, and how to successfully get involved. ... Author: Travis E. Oliphant et al. ... Download the file for your platform. If you're not sure which to choose, learn ...
      » pip install numpy
    
Published   Mar 29, 2026
Version   2.4.4
Find elsewhere
🌐
W3Schools
w3schools.com › python › numpy › numpy_getting_started.asp
NumPy Getting Started
NumPy Editor NumPy Quiz NumPy Exercises NumPy Syllabus NumPy Study Plan NumPy Certificate ... If you have Python and PIP already installed on a system, then installation of NumPy is very easy.
🌐
Python.org
discuss.python.org › python help
Install python on windows 10 experience is horrible -- how do i get numpy? - Python Help - Discussions on Python.org
January 16, 2020 - so i down load the 3.8.1 installer run it ok, looks good try some code. numpy is missing. get a cmd window “python pip install numpy --user” doesn’t find pip so, python.org installer doesn’t install a working con…
🌐
NumPy
numpy.org › doc › stable › user › install.html
Installing NumPy — NumPy v2.4 Manual
Skip to main content · Back to top · Choose version · GitHub · Installing NumPy# · See Installing NumPy · Created using Sphinx 7.2.6 · Built with the PyData Sphinx Theme 0.16.1
Top answer
1 of 5
22

Some explanations

In the first case, I didn't check but I guess that pip directly downloads the resource corresponding to the given URL: http://sourceforge.net/projects/numpy/file/NumPy/. The server returns a HTML document, while pip expects an archive one. So that can't work.

Then there are basically two ways to install Python packages:

  • from sources, as you tried then
  • from pre-compiled packages

The first case, you tried it with the command pip install numpy, but since this package contains native code, it requires development tools to be installed properly (which I always found to be a pain in the neck to do on Windows, but I did it so it's clearly feasible). The error you have error: Unable to find vcvarsall.bat means you don't have the tools installed, or the environment properly set up.

For the second case, you have different kinds of pre-compiled packages:

  • wheels, which you install with pip as well
  • installers, which you use as standard installers on Windows

For both, you need to check that the binary has been strictly compiled for your Python architecture (32 or 64 bits) and version.

An easy solution

You can find there several wheels for numpy: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy. To get the proper architecture, check in the name win32 for 32 bits and amd64 for 64 bits. To get the proper Python version, check cpXX: first X is major version, and second X is minor version, so for instance cp27 means CPython 2.7.

Example: pip install numpy‑1.9.2rc1+mkl‑cp27‑none‑win32.whl

The hard solution: installing and using development tools

DISCLAIMER: all the following explanations might not be quite clear. They result from several investigations at different moments, but in my configuration they led to a working solution. Some links might be useless, or redundant, but that's what I noted. All of this requires a bit of cleaning, and probably generalization too.

First, you need to understand that disutils - which is the pre-installed package which handles packages workflow at lower level than pip (and which is used by the latter) - will try to use a compiler that strictly matches the one that was used to build the Python machine you installed.

Official distributions of Python use Microsoft Visual C++ for Microsoft Windows packages. So you will need to install this compiler in this case.

How to find proper version of Visual C++

The string printed by Python with this command python -c "import sys; print(sys.version)" (or when you invoke the interactive shell) will look like this:

3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)]

The last part between square brackets is the identification part of the compiler. Unfortunately, this is not quite straightforward, and you have correspondence lists there:

  • windows - What version of Visual Studio is Python on my computer compiled with? - Stack Overflow
    • visual studio - Detecting compiler versions during compile time - Stack Overflow3
    • Pre-defined Compiler Macros / Wiki / Compilers
    • WinCvt - Windows Converter toolkit

In the example I gave above, this means Microsoft Visual C++ 2010 64 bits.

How to install Visual C++

You cannot find anymore a standalone package of Visual C++ for modern versions. So you will need to install the Windows SDK itself.

Here are some reference links:

  • Download Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 from Official Microsoft Download Center: for Visual C++ 15.00 (Visual Studio 2008). Corresponds to WinSDK 7.
  • Download Microsoft Windows SDK for Windows 7 and .NET Framework 4 from Official Microsoft Download Center: for Visual C++ 16.00 (Visual Studio 2010). Corresponds to WinSDK 7.1.
  • installation - where can I download the full installer for Visual C++ Express? - Super User
    • Visual Studio & co. downloads

Troubleshooting

You might have an error at the installation of the SDK: DDSet_Error: Patch Hooks: Missing required property 'ProductFamily': Setup cannot continue. DDSet_Warning: Setup failed while calling 'getDLLName'. System error: Cannot create a file when that file already exists.

They have been reported in several questions already:

  • Windows 7 SDK Installation Failure
  • Error installing Windows 7 SDK 7.1 with VS2008, VS2010 Premium on Win 7 32bit

As a solution, you can check this link: Windows SDK Fails to Install with Return Code 5100

The thing is to remove all conflicting (understand: the ones that the SDK installer tries to install itself) version of the Visual C++ redistributable.

Use development tools

Normally you should run vsvarsall.bat (located inside the VC folder of the installation path of Visual Studio - example: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat) to set up the proper environment variables so that the execution of distutils doesn't fail when trying to compile a package.

This batch script accepts a parameter, which should set the wanted architecture. However I saw that with the free versions of the SDK some additional scripts were missing when trying several of these parameters.

Just to say that if you are compiling for a 32 bits architecture, simply calling vsvarsall.bat should work. If you need to compile for 64 bits, you can directly call SetEnv.cmd, located somewhere under inside the SDK installation path - example: "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64.

2 of 5
3

On Windows, pip is great for installing packages that do not require compiling. Otherwise, seriously, save yourself the hassle of building and maintaining packages, and take advantage of the work others did for you. I recommend using either of these Python distributions:

  • ActivePython
  • Anaconda

Anaconda is a little larger to download and install, but it includes many useful third-party packages by default (such as numpy). ActivePython includes a package manager which allows you to easily install pre-compiled binaries (installing numpy is as easy as pypm install numpy).

The advantage of using these Python distributions is that you can get a working installation running in minutes, in an easily reproducible manner.

🌐
UltaHost
ultahost.com › knowledge-base › install-numpy-python
How to Install NumPy using Python | Ultahost Knowledge Base
November 28, 2024 - Learn to install NumPy on Windows and Linux with step-by-step instructions for setting up Python, installing pip, and verifying NumPy.
🌐
Solarian Programmer
solarianprogrammer.com › 2017 › 02 › 25 › install-numpy-scipy-matplotlib-python-3-windows
Install NumPy, SciPy, Matplotlib with Python 3 on Windows | Solarian Programmer
February 25, 2017 - 1 python -m pip install numpy 2 python -m pip install scipy 3 python -m pip install matplotlib · After each of the above commands you should see Successfully installed …. Launch Python from a cmd window and check the version of Scipy, you should see something like this:
🌐
Edureka
edureka.co › blog › install-numpy
How To Install NumPy In Python | NumPy Installation | Edureka
December 5, 2024 - Python is not installed by default in windows operating system. You can download the required version of python from python.org. Once python is installed successfully, open command prompt and use pip to install numpy.
🌐
The Windows Club
thewindowsclub.com › the windows club › how to install numpy using pip on windows 11
How to install NumPy using PIP on Windows 11
July 20, 2025 - NumPy is an open-source library for the Python programming language. We show you how to install NumPy using PIP on Windows 11/10 PC.
Top answer
1 of 4
30

Installing NumPy on Windows is a common problem if you don't have the right build setup. Instead, I always go to Christoph Gohlke's website to download the wheels you can install for your computer. Christoph generously builds the libraries himself with the right build environment, and he posts them on his website. These are specifically pre-compiled wheels made for Windows. I've found that Christoph Gohlke's website of pre-compiled wheels is the best way to install the NumPy and SciPy packages on Windows.

Currently, Christoph Gohlke hosts those wheels on his Github page found here: https://github.com/cgohlke/numpy-mkl-wheels/

Visit the Releases page. In the section that is the most up-to-date, make sure you click on the "Show all assets" link to uncover all of the wheels he has built, including NumPy and SciPy.

Right-click on the one that is specifically for your computer and download it. For example, numpy-1.26.3-cp311-cp311-win_amd64.whl indicates that this is NumPy 1.26.3, Python 3.11, Windows 64-bit.

Once downloaded, use pip to install the wheel:

pip install numpy-1.26.3-cp311-cp311-win_amd64.whl

This assumes you run the command in the same directory where you saved the wheel file. On the Releases page, search for the filename that is specifically for your machine according to the suitable Python, NumPy, and bit versions suitable for your environment and download the file, then run pip install as above.


These instructions are now out of date - keeping these for prosperity

First, install pipwin from PyPI which will install a utility that acts like pip but it will download the actual package you're interested in from his website, then use pipwin install to install the package you want.

First do:

pip install pipwin

When that's installed, you can then do:

pipwin install numpy

This will install the latest version of NumPy on your system. This way you don't have to specifically search for the version of NumPy that is for your specific version of Python.

2 of 4
5

Starting 24 November 2021, latest numpy require at least Python 3.8

Note: This might not be the original question asked, but it might help anyone come here.

To use python 3.7, latest numpy you can use is v1.21.4. So, to install it, use:

pip install numpy==1.21.4

If you write requirements that you hope compatible with python 3.7, you can use numpy<=1.21.4


EDIT: in 20 December 2021, numpy release version 1.21.5 that support Python 3.7

From comment section, by @sam, numpy 1.21.5 support Python 3.7. It was released after 1.22.0rc1 (the latest numpy version as the writing of the original post) that only support Python 3.8++.

Lesson learned from this experience, it would be better to use <,

pip install numpy<1.22.0

or

install_requires = [
    "numpy<1.22.0", # lates version to support python 3.7
],

EDIT: 1.21.6 released on Apr 12, 2022.

🌐
YouTube
youtube.com › watch
How To Install NumPy in Visual Studio Code Windows 11 | NumPy on VSCode - YouTube
How to Install NumPy and Prerequisites for NumPy in Visual Studio Code (VS Code)** **Description:** Want to use **NumPy** in **Visual Studio Code (VS Code)...
Published   March 26, 2025
🌐
Medium
medium.com › @debopamdeycse19 › how-to-install-numpy-on-your-system-640c230716ff
How to Install Numpy on Your System? | by Let's Decode | Medium
October 6, 2023 - You can install Numpy in two ways 1. using Conda or 2. Using pip, we will see how to install Numpy using Pip. ... A computer running Windows, macOS, Ubuntu, or any other Linux distribution. Your machine has Python installed.
🌐
Reddit
reddit.com › r/learnpython › help with numpy (installation)
r/learnpython on Reddit: Help With NumPy (Installation)
November 13, 2022 -

UPDATE: Problem fixed. Thanks for the help, everyone.

For those having the same issue: My problem was that the virtual environment in PyCharm was preventing me from accessing my installation of numpy. If you are using PyCharm, be sure to use the in-built menus to install numpy from within the app (tutorial linked by someone in the comments below)!

Hello all,

I have been having some troubles attempting to install and use the NumPy module. I would like to create some arrays/matrices to use in the project I am working on. However, I cannot seem to get it to work...

So I looked it up, apparently I managed to grab a Python package that does not already have NumPy. That's fine, I can install it myself. But when I tried to type pip install numpy, it gives me the following error message (I tried just typing pip, pip install, but nothing seems to work):

Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> pip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'pip' is not defined
>>> pip install
  File "<stdin>", line 1
    pip install
        ^
SyntaxError: invalid syntax
>>> pip install numpy
  File "<stdin>", line 1
    pip install numpy
        ^
SyntaxError: invalid syntax
>>>

I did some looking around on google, and found someone who said to try importing pip before attempting the install, and so I did just that in my python cmd window (this is the python shell that I can launch from my start menu, but I have also tried this on the regular windows cmd window), et voila, it installed it. Problem solved, or so it seemed...

So I then go to try and use import numpy and even from numpy import * in my script in PyCharm, but I get the following messages:

"No module named numpy" or "Unresolved reference 'numpy'."

What gives? Now, I will say that there seems to be something up with my PATH, because if I type py into my Windows cmd window, python loads up, but if I type out python, it pulls up the windows store. I remember that the shell said something about the PATH while "installing" numpy, but I didn't think anything of it because it still completed the installation, so I did not copy down the exact message.

Any help would be appreciated. I feel like it's something to do with the PATH stuff, or I somehow messed up my original python installation. But everything else works fine, I've been writing code for the past four days with no issues.