Import Error: No module named numpy

前端 未结 24 2298
名媛妹妹
名媛妹妹 2020-11-28 01:53

I have a very similar question to this question, but still one step behind. I have only one version of Python 3 installed on my Windows 7 (sorry) 64-bit system.

相关标签:
24条回答
  • 2020-11-28 02:42

    You can try:

    py -3 -m pip install anyPackageName

    In your case use:

    py -3 -m pip install numpy

    Thanks

    0 讨论(0)
  • 2020-11-28 02:44

    solution for me - I installed numpy inside a virtual environment, but then running ipython was not inside virtual env:

    (venv) ➜  which python
    /Users/alon/code/google_photos_project/venv/bin/python
    (venv) ➜  which ipython
    /usr/bin/ipython
    

    so I had to install ipython, and run ipython from the venv like this:

    python -c 'import IPython; IPython.terminal.ipapp.launch_new_instance()'
    
    0 讨论(0)
  • 2020-11-28 02:45

    I was trying to use NumPy in Intellij but was facing the same issue so, I figured out that NumPy also comes with pandas. So, I installed pandas with IntelliJ tip and later on was able to import NumPy. Might help someone someday!

    0 讨论(0)
  • 2020-11-28 02:46

    I think there are something wrong with the installation of numpy. Here are my steps to solve this problem.

    1. go to this website to download correct package: http://sourceforge.net/projects/numpy/files/
    2. unzip the package
    3. go to the document
    4. use this command to install numpy: python setup.py install
    0 讨论(0)
  • 2020-11-28 02:47

    You can simply use

    pip install numpy
    

    Or for python3, use

    pip3 install numpy
    
    0 讨论(0)
  • 2020-11-28 02:47

    I had this problem too after I installed Numpy. I solved it by just closing the Python interpreter and reopening. It may be something else to try if anyone else has this problem, perhaps it will save a few minutes!

    0 讨论(0)
提交回复
热议问题