操作系统:window10
python版本:3.65
1.尝试安装,报错
pip install web.py
ModuleNotFoundError: No module named 'utils'
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pip-install-j9kbgtqp\web.py\
*提示缺少模块utils
pip install utils
安装之后,再次运行
pip install web.py
ModuleNotFoundError: No module named 'db'
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pip-install-rjqj7n2r\web.py\
*提示缺少模块db
pip install db
安装成功之后,提示下面的错误,困扰许久
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("var", var)?
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pip-install-0zd81wui\web.py\
2.无意中发现web.py的官网中
web.py 0.39 is the latest released version of web.py. You can install it by running:
pip install web.py
The above version only supports Python 2. If you looking for Python 3 support, try the experimental version.
pip install web.py==0.40-dev1
意思是如果想要用python3,尝试安装下面这行版本为0.40的。问题解决。可成功安装
3.需要注意的是,安装0.40版本web.py,不需要utils及db模块的前置安装。