1、
输入:pip install pdb
报错信息:Could not find a version that satisfies the requirement pdb (from versions: ) No matching distribution found for pdb You are using pip version 9.0.1, however version 20.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
原因:pip 版本太低,导致无法安装软件
解决办法:升级pip版本 输入: python -m pip install --upgrade pip
2、
输入: python -m pip install --upgrade pip
报错信息: AttributeError: 'NoneType' object has no attribute 'bytes'
再次输入: python -m pip install --upgrade pip
报错信息:Requirement already up-to-date: pip in f:\code\python\crawl_advence\venv\lib\site-packages (20.1)
Could not build wheels for pip, since package 'wheel' is not installed.
原因:pip版本过高,不匹配(自动升级版本为20.1)
解决办法: python -m pip install --upgrade pip == 19.2.3 降低匹配版本在进行安装
3、
peewee在进行数据表创建时出错
报错信息:Warning: (3090, "Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.")
解决办法:
登陆mysql 并输入以下命令:
set @@GLOBAL.sql_mode='';
set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
set @@sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';