Windows: Installed numpy (conda): ModuleNotFoundError

Viewed 175

I've conda installed numpy in my environment, and it seems to be working in the command line.

Yet when I run a file which imports it, I get a

ModuleNotFoundError

These are my packages:

(pandaenv) C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python>webscraper_test.pyTraceback (most recent call last):
  File "C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python\webscraper_test.py", line 1, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
        (pandaenv) C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python>webscraper_test.pyTraceback (most recent call last):
          File "C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python\webscraper_test.py", line 1, in <module>
            import numpy as np
        ModuleNotFoundError: No module named 'numpy'

        (pandaenv) C:\Users\LorenzKort\OneDrive - ITDS Groep B.V\Documenten\Python>python
        Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] :: Anaconda custom (64-bit) on win32
        Type "help", "copyright", "credits" or "license" for more information.
        >>> import numpy
        >>> numpy
        <module 'numpy' from 'C:\\Users\\LorenzKort\\Miniconda3\\envs\\pandaenv\\lib\\site-packages\\numpy\\__init__.py'>
1 Answers

Try running pip3 install numpy

Also, try running your script with python3 webscraper_test.py

Related