且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

导入sutime模块时出现以下“导入错误"-这是什么意思?

更新时间:2022-06-16 10:46:28

不是很可能是因为循环导入是导致错误的最可能原因.失败,不完整或某种奇怪的安装方式更有可能.试试这个:

It's not true that a circular import is the most likely cause of your error. A failed, incomplete, or in some way strange installation is more likely. Try this:

pip uninstall sutime
pip uninstall jpype1
pip uninstall setuptools_scm
pip3 install setuptools_scm jpype1  # note: pip3
pip3 install sutime

然后,在python-sutime目录中,输入以下命令:

Then, in the python-sutime directory, enter this command:

./test.sh

它应该输出大量的日志行,最后一行但与此类似:

It should output lots of log lines, and the last line but one should be similar to this:

======================== 5 passed, 2 warnings in 13.06s ========================

在同一目录中,您可以从README的示例"部分输入并运行Python脚本.它应该在报告输出之前输出许多日志行.也许可以避免这种情况,但是无论如何,脚本启动时只会发生一次.

In the same directory you can enter and run the Python script from the Example section of the README. It should output many log lines before the reported output. There may be a way to avoid that, but anyway it happens only once, when the script starts.