[Win7][Python36]Pyglossary使用请教问题【已解决】
本帖最后由 rororay 于 2020-3-19 13:30 编辑在Win7系统下使用Python36,通过pip直接安装了Pyglossary 3.2.1,按教程https://github.com/ilius/pyglossary/issues/65,使用cmd调用pyglossary.pyw,出错
教程如下
[*]
[*]First download and install python:
https://www.python.org/ftp/python/3.5.0/python-3.5.0.exe
[*]Then clone the current GitHub repository (or just download it).
[*]Finally run this command:
C:\Python35-32\python.exe c:\path1\pyglossary\pyglossary.pyw --ui=tk
出错信息:Traceback (most recent call last):File "C:\users\……\Python36\share\pyglossary\pyglossary.pyw", line 30, in <module> from pyglossary import core# essentialFile "C:\users\……\Python36\share\pyglossary\pyglossary.pyw", line 30, in <module> from pyglossary import core# essentialImportError: cannot import name 'core'
分析是import无法调用core.py时出错其中pyglossary.pyw安装于路径share\pyglossary\而调用的core模块安装于路径Python36\Lib\site-packages\pyglossary\core.py
求助大神何解?
进入到pyglossary.pyw所在文件夹,在shell中输入命令:python pyglossary.pyw profesor 发表于 2020-3-18 20:18
进入到pyglossary.pyw所在文件夹,在shell中输入命令:python pyglossary.pyw
这个之前已尝试过,使用cmder在share/pyglossary下运行,一样的报错。
相比 https://github.com/ilius/pyglossary 这里下载下来的 ZIP ,
https://cowtransfer.com/s/7bd1ea32d23147 这里的“pyglossary-master.zip”就多了一个 cmd.bat ,解压缩,双击 cmd.bat 运行即可。
cmd.bat 里就一行
python pyglossary.pyw --ui=tk
Oeasy 发表于 2020-3-19 13:26
相比 https://github.com/ilius/pyglossary 这里下载下来的 ZIP ,
https://cowtransfer.com/s/7bd1ea32d2 ...
收到,谢谢!
昨天已搞定,应该是pip默认安装路径的问题,导致安装后的pyglossary模块之间不能引用
解决方法比较粗暴,直接主页下的zip解压缩到site-packages后,直接调用这个命令python pyglossary.pyw --ui=tk就ok了~
页:
[1]