Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
导入lda python函数时出现异常错误_Python_Lda - Fatal编程技术网

导入lda python函数时出现异常错误

导入lda python函数时出现异常错误,python,lda,Python,Lda,导入模块时出现异常错误。我已经安装了lda及其相关软件包:Numpy和。在此,我将分享我得到的异常输出 import lda Traceback (most recent call last): File "<ipython-input-120-4b4ad2b47765>", line 1, in <module> import lda File "C:\Python27\Lib\site-packages\lda\__init__.py", lin

导入模块时出现异常错误。我已经安装了lda及其相关软件包:Numpy和。在此,我将分享我得到的异常输出

import lda

Traceback (most recent call last):

  File "<ipython-input-120-4b4ad2b47765>", line 1, in <module>
    import lda

  File "C:\Python27\Lib\site-packages\lda\__init__.py", line 10, in <module>
    __version__ = pbr.version.VersionInfo('lda').version_string()

  File "C:\Python27\Lib\site-packages\pbr\version.py", line 466, in version_string
    return self.semantic_version().brief_string()

  File "C:\Python27\Lib\site-packages\pbr\version.py", line 461, in semantic_version
    self._semantic = self._get_version_from_pkg_resources()

  File "C:\Python27\Lib\site-packages\pbr\version.py", line 448, in _get_version_from_pkg_resources
    result_string = packaging.get_version(self.package)

  File "C:\Python27\Lib\site-packages\pbr\packaging.py", line 748, in get_version
    name=package_name))

Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name lda was given, but was not able to be found.
导入lda
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
进口lda
文件“C:\Python27\Lib\site packages\lda\\uuuuu init\uuuuuu.py”,第10行,在
__version\u=pbr.version.VersionInfo('lda')。version\u string()
文件“C:\Python27\Lib\site packages\pbr\version.py”,第466行,版本\字符串
返回self.semantic_version().brief_string()
语义版本中的文件“C:\Python27\Lib\site packages\pbr\version.py”,第461行
self.\u semantic=self.\u从\u pkg\u资源()获取\u版本\u
文件“C:\Python27\Lib\site packages\pbr\version.py”,第448行,位于\u-get\u-version\u-from\u-pkg\u参考资料中
result\u string=packaging.get\u版本(self.package)
get\U版本中的文件“C:\Python27\Lib\site packages\pbr\packaging.py”,第748行
名称=包(名称)
例外情况:此项目的版本控制需要sdist tarball或访问上游git存储库。setup.cfg中的包名与提供给pbr.version.VersionInfo的参数之间也可能不匹配。已提供项目名称lda,但找不到。

有人能帮我吗?

你确定安装了git吗?您还可以尝试升级分发模块
pip安装--升级分发
。首先使用
pip install lda安装lda
@nishant:我已经安装了lda。之后,当我导入lda时,它抛出异常。您是否尝试使用easy_install?