Paraview python:GUI与命令提示符

时间:2017-11-23 14:45:39

标签: python startup paraview

这是一个与之相关的问题 Trace files/modules loaded when launching python

我在Ubuntu 14.04 LTS下使用Paraview 4.0.1,在加载python提示符时出现不同的行为:

  1. 在命令行中,所有内容都能正常运行"。

  2. 在GUI(" python shell")中,from paraview.simple import *失败,无论是自动(启动时)还是显式导入。

  3. 下面我添加(TL; DR)上面的方法1和2获得的输出的比较,两个级别的详细程度。

    1. 输出(标准详细级别)
    2. 1.1。在命令提示符下:

      $ pvpython 
      Python 2.7.6 (default, Oct 26 2016, 20:33:43) 
      [GCC 4.8.4] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> from paraview.simple import *
      paraview version 4.0.1
      >>> 
      

      1.2。在GUI中的python shell:

      Python 2.7.6 (default, Oct 26 2016, 20:33:43) 
      [GCC 4.8.4] on linux2
      from paraview.simple import *
      Traceback (most recent call last):
        File "<console>", line 1, in <module>
        File "/usr/lib/python2.7/dist-packages/paraview/simple.py", line 41, in <module>
          import servermanager
        File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 3157, in <module>
          __initialize()
        File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 3148, in __initialize
          c = Connection(iter.GetCurrentSessionId(), iter.GetCurrentSession())
        File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 1935, in __init__
          _createModules(self.Modules)
        File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 2567, in _createModules
          m.filters = createModule('filters')
        File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 2629, in createModule
          if (prop.GetInformationOnly() and propName != "TimestepValues" ) \
      AttributeError: 'NoneType' object has no attribute 'GetInformationOnly'
      >>> from paraview.simple import *
      Traceback (most recent call last):
        File "<console>", line 1, in <module>
        File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 2190, in find_module
          if vtkPVPythonModule.HasModule(fullname):
      AttributeError: 'NoneType' object has no attribute 'HasModule'
      >>> 
      
      1. 输出(详细级别2)
      2. 2.1。在命令提示符下:

        由于SO中的长度限制而发布here

        2.2。在GUI中的python shell:

        Python Shell窗口:由于SO中的长度限制而发布here

        输出消息窗口:由于SO中的长度限制而发布here

0 个答案:

没有答案