Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

As a newbie, how do I install numpy as a module please?

I have returned to python after a long break.

I have the following error in my code to understand and resolve: ModuleNotFoundError: No module named ‘numpy’.

I am using a Mac and working in VSstudio – how do I install numpy as a module please?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I have tried searching extensions for the numpy module, and working through messages on this platform.

>Solution :

To resolve the issue:

  1. Open Terminal on your Mac.

  2. Install NumPy by running the following command:

    pip3 install numpy
    
  3. Verify the installation with this command:

    python3 -c "import numpy; print(numpy.__version__)"
    
  4. In VS Code, open the Command Palette by pressing Cmd + Shift + P. Search for Python: Select Interpreter and select the Python environment where NumPy is installed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading