在 pydev(eclipse) 中安装 Numpy
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29765250/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Install Numpy in pydev(eclipse)
提问by Dinesh Patro
I am trying to install a package called 'numpy'. i have python setup in eclipse luna with the help of pydev. how do i install numpy in pydev.
我正在尝试安装一个名为“numpy”的包。我在 pydev 的帮助下在 eclipse luna 中设置了 python。我如何在 pydev 中安装 numpy。
tried putting numpy in site-packages folder. doesnt seem to work
尝试将 numpy 放在 site-packages 文件夹中。似乎不起作用
回答by Denis Vitez
do you have pip installed with your python? How to install pip
你的python安装了pip吗? 如何安装pip
Then if you have your path variable set you can simply type "pip install numpy" into command line.
然后,如果您设置了路径变量,您只需在命令行中输入“pip install numpy”即可。
回答by Himanshu dua
download the required version of numpy from here http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/and the install directly ,it will run on eclipse automatically
从这里下载所需版本的numpy http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/并直接安装,它会自动在eclipse上运行
If it does not solve your purpose use Pip:
如果它不能解决您的目的,请使用 Pip:
pip install numpy
回答by Stanton
Correct way is to create a virtualenv virtualenv ~/venvs/eclipse
, install numpy (source ~/venv/eclipse/bin/activate;pip install numpy
), then add the virtualenv to eclipse (see https://www.rose-hulman.edu/class/csse/resources/Eclipse/eclipse-python-configuration.htm)
正确的方法是创建一个 virtualenv virtualenv ~/venvs/eclipse
,安装 numpy ( source ~/venv/eclipse/bin/activate;pip install numpy
),然后将 virtualenv 添加到 eclipse (参见https://www.rose-hulman.edu/class/csse/resources/Eclipse/eclipse-python-configuration.htm)
回答by Rama Krishna
In Eclipse, Goto Windows->PreferencesSelect PyDev->Interpreters->Python Interpreters
在 Eclipse 中,转到Windows->Preferences选择PyDev->Interpreters->Python Interpreters
Then click on Manage with pipbutton, then you will see a new window like below, you just need to type your package and click Run/Press enter.
然后点击Manage with pip按钮,然后你会看到一个如下所示的新窗口,你只需要输入你的包并点击 Run/Press enter。
After this, Click Apply and OK, then Right click on Project then click on PyDev->Remove error markers.
在此之后,单击 Apply 和 OK,然后右键单击 Project 然后单击PyDev->Remove error marker。
Hope it works.
希望它有效。
回答by Santosh Gadagamma
Pandas can be installed after install python in to your pc. to install pandas go to command prompt and type "pip install pandas" this command collecting packages related to pandas. After if it asking to upgrade pip or if pip is not recognized by the command prompt use this command: python -m pip install --upgrade pip.
在你的电脑上安装 python 后,可以安装 Pandas。安装Pandas去命令提示符并输入“pip install pandas”这个命令收集与Pandas相关的包。如果它要求升级 pip 或者命令提示符无法识别 pip,请使用以下命令:python -m pip install --upgrade pip。