安装包后出现 'module not found' 错误
Getting a 'module not found' error after installing a package
我尝试使用
在 python 中安装 deuces 包
python -m pip install deuces
安装完美。但是每当我尝试调用该函数时,我都会收到一条错误消息:
Traceback (most recent call last): File "", line 1, in
File
"C:\Python\Anaconda\lib\site-packages\deuces__init__.py", line 1, in
from card import Card ModuleNotFoundError: No module named 'card'
尽管我找不到模块调用有什么问题。有人可以检查这里出了什么问题吗?
PS:我确实阅读了 post 但没有找到解决方案。
您很可能在 Python 中尝试 运行 这段代码 3. 遗憾的是 deuces
模块的 page in the PyPI repository 没有明确表示该模块当前仅出现支持Python2,模块导入完美
由于该模块最近似乎没有受到太多关注,如果您想 运行 它在 Python 3 下,您可能最终会自己进行移植。看起来并不需要太多的工作。
似乎该包正在使用 python 2 仅相对导入 here, which was removed py PEP 404。
这些应该更改为 douces.xxx
或相对导入 .xxx
。目前,你最好的希望是做一个 PR 来解决这个问题,或者分叉库并自己修复它。
我尝试使用
在 python 中安装 deuces 包python -m pip install deuces
安装完美。但是每当我尝试调用该函数时,我都会收到一条错误消息:
Traceback (most recent call last): File "", line 1, in File "C:\Python\Anaconda\lib\site-packages\deuces__init__.py", line 1, in from card import Card ModuleNotFoundError: No module named 'card'
尽管我找不到模块调用有什么问题。有人可以检查这里出了什么问题吗?
PS:我确实阅读了 post
您很可能在 Python 中尝试 运行 这段代码 3. 遗憾的是 deuces
模块的 page in the PyPI repository 没有明确表示该模块当前仅出现支持Python2,模块导入完美
由于该模块最近似乎没有受到太多关注,如果您想 运行 它在 Python 3 下,您可能最终会自己进行移植。看起来并不需要太多的工作。
似乎该包正在使用 python 2 仅相对导入 here, which was removed py PEP 404。
这些应该更改为 douces.xxx
或相对导入 .xxx
。目前,你最好的希望是做一个 PR 来解决这个问题,或者分叉库并自己修复它。