python3-ImportError:没有名为“ _chipset”的模块

用户名

我试图运行python3脚本,如下所示:

$python3 quick_dump.py

...但是每次我得到的输出为:

ImportError:没有名为“ _chipset”的模块

我只是看了quick_dump.py脚本导入,它们在这里:

#!/usr/bin/env python3

# register definition format:
# ('register name', 'register offset', 'register type')
#
# register types:
#  '' - normal register
#  'DPIO' - DPIO register
#
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4

import argparse
import os
import sys
import ast
import subprocess
import chipset
import reg_access as reg

我尝试了$ python3-> help()util来查看芯片组模块是否可用。我可以看到列表中显示了芯片组模块;因此,一切都应该没问题,但不是:P btw我在列表中没有看到_chipset模块,所以也许这是东西吗?

我看了chipset.py脚本及其代码:

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.





from sys import version_info
if version_info >= (2,6,0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_chipset', [dirname(__file__)])
        except ImportError:
            import _chipset
            return _chipset
        if fp is not None:
            try:
                _mod = imp.load_module('_chipset', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _chipset = swig_import_helper()
    del swig_import_helper
else:
    import _chipset
del version_info
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static):
        self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError(name)

def _swig_repr(self):
    try: strthis = "proxy of " + self.this.__repr__()
    except: strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0



def is_sandybridge(*args):
  return _chipset.is_sandybridge(*args)
is_sandybridge = _chipset.is_sandybridge

def is_ivybridge(*args):
  return _chipset.is_ivybridge(*args)
is_ivybridge = _chipset.is_ivybridge

def is_valleyview(*args):
  return _chipset.is_valleyview(*args)
is_valleyview = _chipset.is_valleyview

def is_cherryview(*args):
  return _chipset.is_cherryview(*args)
is_cherryview = _chipset.is_cherryview

def is_haswell(*args):
  return _chipset.is_haswell(*args)
is_haswell = _chipset.is_haswell

def is_broadwell(*args):
  return _chipset.is_broadwell(*args)
is_broadwell = _chipset.is_broadwell

def is_skylake(*args):
  return _chipset.is_skylake(*args)
is_skylake = _chipset.is_skylake

def intel_get_pci_device():
  return _chipset.intel_get_pci_device()
intel_get_pci_device = _chipset.intel_get_pci_device

def intel_register_access_init(*args):
  return _chipset.intel_register_access_init(*args)
intel_register_access_init = _chipset.intel_register_access_init

def intel_register_read(*args):
  return _chipset.intel_register_read(*args)
intel_register_read = _chipset.intel_register_read

def intel_register_write(*args):
  return _chipset.intel_register_write(*args)
intel_register_write = _chipset.intel_register_write

def intel_register_access_fini():
  return _chipset.intel_register_access_fini()
intel_register_access_fini = _chipset.intel_register_access_fini

def intel_register_access_needs_fakewake():
  return _chipset.intel_register_access_needs_fakewake()
intel_register_access_needs_fakewake = _chipset.intel_register_access_needs_fakewake

def pcidev_to_devid(*args):
  return _chipset.pcidev_to_devid(*args)
pcidev_to_devid = _chipset.pcidev_to_devid

def intel_dpio_reg_read(*args):
  return _chipset.intel_dpio_reg_read(*args)
intel_dpio_reg_read = _chipset.intel_dpio_reg_read

def intel_flisdsi_reg_read(*args):
  return _chipset.intel_flisdsi_reg_read(*args)
intel_flisdsi_reg_read = _chipset.intel_flisdsi_reg_read
# This file is compatible with both classic and new-style classes.

所以我的问题是……如何解决错误,或者有没有一种最佳的解决方法?


编辑 :

我试图a)配置b)编译c)使用make util安装intel-gpu-tools源;因此它似乎已安装,但仍然无法调用quick_dump;。我输入“ $ sudo quick_dump ”,但得到“ sudo:quick_dump:找不到命令”作为输出:(

请给我一个提示,我做错了什么?

谢谢

大卫·福斯特(David Foerster)

_chipset被认为是本机模块(请参阅chipset.i同一目录),你需要从源代码编译明显。

粗略的下载和编译说明:

  1. git使用软件包管理器安装并克隆存储库:

    git clone git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
    cd intel-gpu-tools
    
  2. 安装构建工具(build-essential autoconf automake gcc),先决条件(请参阅参考资料的最后部分README)并运行./autogen.sh(它告诉您缺少的先决条件)。

  3. 建造: make -C tools/quick_dump

  4. 安装: sudo make -C tools/quick_dump install

我自己没有尝试过,因为在这里很难安装i915驱动程序开发文件。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

的Python3。ImportError:没有名为“ myfile”的模块

python3:ImportError:没有名为xxxx的模块

Python3 ImportError:没有名为“ _tkinter”的模块

Python 3 ImportError:没有名为“ ConfigParser”的模块

Python 3:ImportError“没有名为Setuptools的模块”

ImportError:Python 3中没有名为“模型”的模块

ImportError:没有名为boto3的模块

ImportError:没有名为pymc3的模块

Python:ImportError:没有名为请求的模块

GAE Python PyML ImportError:没有名为_ckernel的模块

Python ImportError:没有名为sty的模块

python ImportError:没有名为包的模块

Python ImportError:没有名为os的模块

Python:ImportError:没有名为_pluggy的模块

ImportError:在Python 3.4中没有名为“ PIL”的模块

ImportError。没有名为Commons错误的模块-python

Python ImportError:没有名为zhelpers的模块

ImportError:没有名为sklearn的模块(Python)

ImportError:Linux上没有名为“ cplex” Python的模块

ImportError:没有名为jabber:python的模块

ImportError:没有名为“ requests”的模块Python 3.4.0

Python泡菜:ImportError:没有名为__main__的模块

ImportError:Python 3.6中没有名为comtypes的模块

Python:ImportError 没有名为 mysql.connector 的模块

Python:ImportError:没有名为 Selenium Windows 的模块

ImportError:没有名为解析python / node js的模块

Python 2.7 ImportError:没有名为存储库的模块

Python-ImportError:没有名为“ requests”的模块

/ bin / python3:没有名为pip的模块