What is pip's `--no-cache-dir` good for?

后端 未结 5 674
清酒与你
清酒与你 2021-01-30 07:55

I\'ve recently seen the --no-cache-dir being used in a Docker file. I\'ve never seen that flag before and the help is not explaining it:

 --no-cache         


        
5条回答
  •  一生所求
    2021-01-30 08:10

    I get permission error for installation of some pip packages if I don't use --no-cache-dir option.

    Building wheels for collected packages: pyyaml, bottleneck, nvidia-ml-py3
      WARNING: Building wheel for pyyaml failed: [Errno 13] Permission denied: '/home/user/.cache/pip/wheels/b1'
      WARNING: Building wheel for bottleneck failed: [Errno 13] Permission denied: '/home/user/.cache/pip/wheels/92'
      WARNING: Building wheel for nvidia-ml-py3 failed: [Errno 13] Permission denied: '/home/user/.cache/pip/wheels/7f'
    

    chown /.cache folder didn't help for some reason but with --no-cache-dir it works ok.

提交回复
热议问题