撤消禁用pip缓存

时间:2017-08-17 19:36:53

标签: python caching lambda pip serverless-framework

我不小心使用--no-cache-dir选项运行了点子。现在,当我尝试部署无服务器项目时,我遇到了以下错误消息。

The directory '/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Uc5FLI/unroll/

有没有办法重新启用pip缓存?

1 个答案:

答案 0 :(得分:1)

您已经运行sudo -H pip install; sudo以root身份运行pippip更改了您家庭目录下的某些文件和目录的所有权。拿回文件:

sudo chown -R $USER $HOME