我正在尝试使用git bash在本教程中通过python setup.py install安装PLY,但是结果不一样。

python setup.py install输出:

running install
running build
running build_py
running install_lib
creating c:\Python27\Lib\site-packages\ply
copying build\lib\ply\cpp.py -> c:\Python27\Lib\site-packages\ply
copying build\lib\ply\ctokens.py -> c:\Python27\Lib\site-packages\ply
copying build\lib\ply\lex.py -> c:\Python27\Lib\site-packages\ply
copying build\lib\ply\yacc.py -> c:\Python27\Lib\site-packages\ply
copying build\lib\ply\__init__.py -> c:\Python27\Lib\site-packages\ply
byte-compiling c:\Python27\Lib\site-packages\ply\cpp.py to cpp.pyc
byte-compiling c:\Python27\Lib\site-packages\ply\ctokens.py to ctokens.pyc
byte-compiling c:\Python27\Lib\site-packages\ply\lex.py to lex.pyc
byte-compiling c:\Python27\Lib\site-packages\ply\yacc.py to yacc.pyc
byte-compiling c:\Python27\Lib\site-packages\ply\__init__.py to __init__.pyc
running install_egg_info
Writing c:\Python27\Lib\site-packages\ply-3.4-py2.7.egg-info


我什至不能使用https://github.com/dabeaz/ply所示的PLY

import ply.lex as lex


我收到错误command not found

最佳答案

如果有人在乎,我就解决了,我只安装了setuptools

关于python - PLY安装不正确,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24440044/

10-09 04:30