使用pip安装模块时,提示MemoryError

在使用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

猜你喜欢

转载自blog.csdn.net/weixin_42551921/article/details/127885178
今日推荐