eclipse无法导入pyqtgraph

时间:2014-03-22 17:18:04

标签: python eclipse pyqtgraph

我最近下载并安装了pyqtgraph,但我无法使用eclipse。我尝试运行此代码:

import numpy as np
import pyqtgraph 
from PySide import QtGui, QtCore

#QtGui.QApplication.setGraphicsSystem('raster')
app = QtGui.QApplication([])
#mw = QtGui.QMainWindow()
#mw.resize(800,800)


win = pyqtgraph.GraphicsWindow(title="Basic plotting examples")

win.resize(1000,600)
win.setWindowTitle('pyqtgraph example: Plotting')

# Enable antialiasing for prettier plots
pyqtgraph.setConfigOptions(antialias=True)

p1 = win.addPlot(title="Basic array plotting", y=np.random.normal(size=100))

p1.setLabel('left', "Y Axis", units='A')
p1.setLabel('bottom', "Y Axis", units='s')

我收到此错误:

  

Traceback(最近一次调用最后一次):文件   " L:\ workspace \ FDM \ pyqtgraph.py",第4行,导入pyqtgraph

     

文件" L:\ workspace \ FDM \ pyqtgraph.py",第13行,在win =   pyqtgraph.GraphicsWindow(title =" Basic plotting examples")   AttributeError:'模块'对象没有属性' GraphicsWindow'

我尝试在强制内置列表下列出pyqtgraph,但我仍然给了我同样的错误。我还检查了pyqtgraph文件夹,它确实有GraphicsWindow的fole。

当我使用iPython时导入确实有效.....

0 个答案:

没有答案