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';