Installing NumPy via Anaconda in Windows

前端 未结 5 2028
一生所求
一生所求 2020-12-05 20:01

I am trying to use Numpy in a Python 2.7.8 script in Windows. So, I download and installed the latest version of Anaconda (I also want to use some of the other tools in Anac

5条回答
  •  春和景丽
    2020-12-05 20:10

    Yep you should start anaconda's python in order to use python libs which come with anaconda. Or otherwise you have to manually add anaconda\lib to pythonpath which is less trivial. You can start anaconda's python by a full path:

    path\to\anaconda\python.exe
    

    or you can run the following two commands as an admin in cmd to make windows pipe every .py file to anaconda's python:

    assoc .py=Python.File
    ftype Python.File=C:\path\to\Anaconda\python.exe "%1" %*
    

    after this you'll be able just to call python scripts without specifying the python executable at all.

提交回复
热议问题