Import Error: No module named numpy

前端 未结 24 2297
名媛妹妹
名媛妹妹 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:25

    Support for Python 3 was added in NumPy version 1.5.0, so to begin with, you must download/install a newer version of NumPy.

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

    I too faced the above problem with phyton 3 while setting up python for machine learning.

    I followed the below steps :-

    Install python-2.7.13.msi

    • set PATH=C:\Python27

    • set PATH=C:\Python27\Scripts

    Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

    Downloaded:- -- numpy-1.13.1+mkl-cp27-cp27m-win32.whl

              --scipy-0.18.0-cp27-cp27m-win32.whl 
    

    Installing numpy: pip install numpy-1.13.1+mkl-cp27-cp27m-win32.whl

    Installing scipy: pip install scipy-0.18.0-cp27-cp27m-win32.whl

    You can test the correctness using below cmds:-

    >>> import numpy
    >>> import scipy
    >>> import sklearn
    >>> numpy.version.version
    '1.13.1'
    >>> scipy.version.version
    '0.19.1'
    >>>
    
    0 讨论(0)
  • 2020-11-28 02:28

    Faced with same issue

    ImportError: No module named numpy
    

    So, in our case (we are use PIP and python 2.7) the solution was SPLIT pip install commands :

    From

    RUN pip install numpy scipy pandas sklearn
    

    TO

    RUN pip install numpy scipy
    RUN pip install pandas sklearn
    

    Solution found here : https://github.com/pandas-dev/pandas/issues/25193, it's related latest update of pandas to v0.24.0

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

    After trying many suggestions from various sites and similar questions, what worked for me was to uninstall all Python stuff and reinstall Anaconda only (see https://stackoverflow.com/a/38330088/1083292)

    The previous Python installation I had was not only redundant but only caused me trouble.

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

    For installing NumPy via Anaconda(use below commands):

    • conda install -c conda-forge numpy
    • conda install -c conda-forge/label/broken numpy
    0 讨论(0)
  • 2020-11-28 02:30

    this is the problem of the numpy's version, please check out $CAFFE_ROOT/python/requirement.txt. Then exec: sudo apt-get install python-numpy>=x.x.x, this problem will be sloved.

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