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

请问ahocorasick这个包是在哪里获取的呢,从官网和其他其它地方下载的都安装失败了 #10

Open
ProWali opened this issue Dec 29, 2018 · 13 comments

Comments

@ProWali
Copy link

ProWali commented Dec 29, 2018

No description provided.

@sh1shan
Copy link

sh1shan commented Dec 29, 2018

安装pyahocorasick可以用,你看下它的官方文档,有说明,pycharm导入有提示别管

@swaker01
Copy link

请问这个提示是怎么处理的啊:AttributeError: module 'ahocorasick' has no attribute 'Automaton'

@johnarchie1
Copy link

楼主解决了吗,我也是一直install不成功

@swaker01
Copy link

swaker01 commented Mar 8, 2019

楼主解决了吗,我也是一直install不成功
出现这个问题:AttributeError: module 'ahocorasick' has no attribute 'Automaton',应该是你把ahocorasick-python这个包给导进去了,所以你要把这个包删了,然后再重新导入pyahocorasick就行了

@johnarchie1
Copy link

楼主解决了吗,我也是一直install不成功
出现这个问题:AttributeError: module 'ahocorasick' has no attribute 'Automaton',应该是你把ahocorasick-python这个包给导进去了,所以你要把这个包删了,然后再重新导入pyahocorasick就行了

我的没有那个问题,是这样的:
C:\Users\john archie>pip install pyahocorasick
Collecting pyahocorasick
Using cached https://files.pythonhosted.org/packages/f4/9f/f0d8e8850e12829eea2e778f1c90e3c53a9a799b7f412082a5d21cd19ae1/pyahocorasick-1.4.0.tar.gz
Installing collected packages: pyahocorasick
Running setup.py install for pyahocorasick ... error
Complete output from command c:\python\python.exe -u -c "import setuptools, tokenize;file='C:\Users\JOHNAR1\AppData\Local\Temp\pip-install-_6pmu264\pyahocorasick\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\JOHNAR1\AppData\Local\Temp\pip-record-jw88oy29\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'ahocorasick' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DAHOCORASICK_UNICODE= -Ic:\python\include -Ic:\python\include /Tcpyahocorasick.c /Fobuild\temp.win-amd64-3.7\Release\pyahocorasick.obj
error: command 'cl.exe' failed: No such file or directory

----------------------------------------

Command "c:\python\python.exe -u -c "import setuptools, tokenize;file='C:\Users\JOHNAR1\AppData\Local\Temp\pip-install-_6pmu264\pyahocorasick\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\JOHNAR1\AppData\Local\Temp\pip-record-jw88oy29\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\JOHNAR~1\AppData\Local\Temp\pip-install-_6pmu264\pyahocorasick\

@swaker01
Copy link

swaker01 commented Mar 8, 2019

楼主解决了吗,我也是一直install不成功
出现这个问题:AttributeError: module 'ahocorasick' has no attribute 'Automaton',应该是你把ahocorasick-python这个包给导进去了,所以你要把这个包删了,然后再重新导入pyahocorasick就行了

我的没有那个问题,是这样的:
C:\Users\john archie>pip install pyahocorasick
Collecting pyahocorasick
Using cached https://files.pythonhosted.org/packages/f4/9f/f0d8e8850e12829eea2e778f1c90e3c53a9a799b7f412082a5d21cd19ae1/pyahocorasick-1.4.0.tar.gz
Installing collected packages: pyahocorasick
Running setup.py install for pyahocorasick ... error
Complete output from command c:\python\python.exe -u -c "import setuptools, tokenize;file='C:\Users\JOHNAR1\AppData\Local\Temp\pip-install-_6pmu264\pyahocorasick\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\JOHNAR1\AppData\Local\Temp\pip-record-jw88oy29\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'ahocorasick' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DAHOCORASICK_UNICODE= -Ic:\python\include -Ic:\python\include /Tcpyahocorasick.c /Fobuild\temp.win-amd64-3.7\Release\pyahocorasick.obj
error: command 'cl.exe' failed: No such file or directory

----------------------------------------

Command "c:\python\python.exe -u -c "import setuptools, tokenize;file='C:\Users\JOHNAR1\AppData\Local\Temp\pip-install-_6pmu264\pyahocorasick\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\JOHNAR1\AppData\Local\Temp\pip-record-jw88oy29\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\JOHNAR~1\AppData\Local\Temp\pip-install-_6pmu264\pyahocorasick\

不太清楚你这咋弄的,我是直接再pycharm上试的

@tectal
Copy link

tectal commented Mar 12, 2019

请问ahocorasick这个包是在哪里获取的呢,从官网和其他其它地方下载的都安装失败了

@johnarchie1
Copy link

请问ahocorasick这个包是在哪里获取的呢,从官网和其他其它地方下载的都安装失败了

官网的包肯定没问题,我最后解决是因为python的版本和MSVC的版本不匹配,重新下了VC2017就成功了

@violahuyoujin
Copy link

我下载了MSVC后,在pycharm上下载了pyahocorasick包,在项目工程包里删除了ahocorasick,运行成功了

@yan624
Copy link

yan624 commented Jun 7, 2019

执行命令
conda install -c https://conda.anaconda.org/conda-forge pyahocorasick
或者参考博客

@sunlinkun
Copy link

可以参考下这篇博客https://blog.csdn.net/weixin_34613450/article/details/89316569
安装成功

@claire12579
Copy link

pip3 install pyahocorasick -i https://pypi.tuna.tsinghua.edu.cn/simple/

@pengrui-China
Copy link

我下载了MSVC后,在pycharm上下载了pyahocorasick包,在项目工程包里删除了ahocorasick,运行成功了

老哥,问一下最后回答的时候一直自动回复是怎么回事呢

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

10 participants