1

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 thread (How do I use Numpy in Python IDLE?) and have not found the help I need. Problem: In many tutorials (Including the official NumPy website), it says to enter: pip install numpy HOWEVER... I am extremely confused as to where to put this. When I enter this into IDLE, it errors out and says, SyntaxError: invalid syntax. Import numpy as np doesn't work either, instead, I receive a different error: Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import numpy as np ModuleNotFoundError: No module named 'numpy'. Please could somebody help me from the beginning. Thank you.

AlienAbove
  • 15
  • 5
  • Does this answer your question? [How to use pip with python 3.4 on windows?](https://stackoverflow.com/questions/24285508/how-to-use-pip-with-python-3-4-on-windows) – Martheen May 17 '21 at 03:13

3 Answers3

2

You have to install numpy from Command Prompt, not IDLE.

Follow these steps on Windows:

  1. Press the Windows key on your keyboard.
  2. Type CMD and open Command Prompt. A black terminal should open up.
  3. Type 'pip install numpy' and hit enter.
  4. It should start the installation. After you see the "Successfully Installed" message, go back to your IDLE and try importing numpy, it should work.

NOTE: In case you get a message saying "pip" is not recognized, refer to: https://stackoverflow.com/a/56678271/13699502

Eshaan Gupta
  • 144
  • 9
  • I don't have a score of 15 and above or else I would have upvoted this comment. Thank you so much for helping me out. I really appreciate it. :) – AlienAbove May 19 '21 at 02:51
0

You write pip install numpy in the command prompt (CMD) if you are on Windows.
And, most of the times py -m pip install numpy helps more on Windows.

On macOS/Unix, you can use python -m pip install numpy in terminal/console.

CoolCoder
  • 675
  • 3
  • 17
0

We can't Install Python Modules Using "Python IDLE".The only Way to Install Modules is Using "Command Prompt".Try to type pip install numpy in command prompt(If it shows error try again by opening command prompt as Adminstrator).

If Pip is not installed, you will get an error message stating that the program is not found. To Install Pip Follow the steps:

1.Download get-pip.py(https://bootstrap.pypa.io/get-pip.py) to a folder on your computer.

2.Open a command prompt and navigate to the folder containing the get-pip.py installer.

3.Run the command: python get-pip.py

We can now verify that Pip was installed correctly by opening a command prompt and entering the command: pip -V

If you didn't get any error message then pip is installed Correctly. Now type pip install numpy in command prompt.

And now Numpy will be installed correctly and we are good to go :)

Thank You.