python newbie:在eclipse中导入numpy模块 [英] python newbie: importing numpy module in eclipse

查看:179
本文介绍了python newbie:在eclipse中导入numpy模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在eclipse中运行一个简单的python程序。这是我第一次导入任何模块。



所以我下载了:numpy和pylab(我正在使用mac)重启我的日食和红线低于

  import numpy 
import pylab

消失了,所以我明白对该模块的引用是可以的。



问题是我仍然看到代码下面的红线,想知道为什么?我必须强调,我相信numpy已经预先安装,我只是升级版本(使用1.5.1-py2.7)。



有谁可以告诉我应该如何运行这段代码?





我的eclipse上的解释器设置:



解决方案

只需删除旧的numpy并安装了版本6.位于此处



另一种规避这个问题的方法是使用 pip install numpy 检查如何安装pip


I'm trying to run a simple python program in eclipse. This is the first time that I'm importting any module.

So I downloaded: numpy and pylab (I'm using a mac) restarted my eclipse and the red line below the

import numpy
import pylab

disappeared so I understood that the reference to that module is ok.

Problem is that I still see red line below the code and wonder why? I have to stress out that I believe numpy was already 'pre-installed' I just upgraded the version (using 1.5.1-py2.7).

Can anyone tell what should I do to run this code?

my interpreter setting on eclipse:

解决方案

Simply removed the old numpy and installed version 6. located here

Another way to circumvent this problem is to use pip install numpy check how to install pip

这篇关于python newbie:在eclipse中导入numpy模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆