Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy缺失问题 #2

Closed
AcademicDog opened this issue Jan 10, 2018 · 7 comments
Closed

numpy缺失问题 #2

AcademicDog opened this issue Jan 10, 2018 · 7 comments

Comments

@AcademicDog
Copy link

环境win 7,requirements.txt中所有组件已经按照要求安装(确定已安装numpy),adb安装并调试通过。运行结果如下:

E:\milion\MillionHeroAssistant-master>python main.py
capture time: 09:58:47
/sdcard/screenshot.png: 1 file pulled. 27.8 MB/s (814862 bytes in 0.028s)
screen width: 1080, screen height: 1920
guess keyword: 2.“读书破万卷”的下一句是什么?

Traceback (most recent call last):
File "main.py", line 91, in
main()
File "main.py", line 77, in main
sentences = get_summary(text, summary_sentence_count)
File "E:\milion\MillionHeroAssistant-master\core\textsummary.py", line 27, in
get_summary
return [str(sentence) for sentence in summarizer(parser.document, sentences)
]
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\sit
e-packages\sumy\summarizers\lsa.py", line 36, in call
self._ensure_dependecies_installed()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\sit
e-packages\sumy\summarizers\lsa.py", line 53, in _ensure_dependecies_installed
raise ValueError("LSA summarizer requires NumPy. Please, install it by comma
nd 'pip install numpy'.")
ValueError: LSA summarizer requires NumPy. Please, install it by command 'pip in
stall numpy'.

E:\milion\MillionHeroAssistant-master>

@smileboywtu
Copy link
Owner

我看requirements.txt 中,我看有numpy了 你这个的化,自己在手动装一下 pip install numpy

@AcademicDog
Copy link
Author

E:\milion\MillionHeroAssistant-master>pip install numpy
Requirement already satisfied: numpy in c:\users\administrator\appdata\local\pro
grams\python\python36-32\lib\site-packages

@smileboywtu
Copy link
Owner

O-O 不是吧 ,你运行下python --version看下是什么

@smileboywtu
Copy link
Owner

这个项目要用python3 会不会是这个问题

@AcademicDog
Copy link
Author

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>python --version
Python 3.6.4

C:\Users\Administrator>

@smileboywtu
Copy link
Owner

那你pip list看下有没有numpy如果有的化 那可能是python 环境的问题

@AcademicDog
Copy link
Author

确实是python环境的问题。原因在于python 3.6.4(最新版本)和numpy 1.14(pip安装的默认版本)的兼容问题,在python idle 中输入import unmpy报错。问题原因类似于
numpy/numpy#9272

解决方法:
卸载原有numpy,使用pip install numpy==1.13。本问题关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants