在使用pip安装依赖模块时,报错如下:
解决方法:
添加 --no-cache-dir参数
pip3 --no-cache-dir install -r *
安装时遇到的其他问题:
- 设置python源命令:
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
提示没有config参数;
- 解决办法:升级pip
pip3 install -U pip
pip install --upgrade pip
- 提示:ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
- 解决:添加参数--ignore-installed
[pip3 --no-cache-dir install -r requirements.txt --ignore-installed