删除点子的缓存? [英] Removing pip's cache?

查看:86
本文介绍了删除点子的缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要专门安装psycopg2 v2.4.1.我不小心做了:

I need to install psycopg2 v2.4.1 specifically. I accidentally did:

 pip install psycopg2

代替:

 pip install psycopg2==2.4.1

这将安装2.4.4,而不是早期版本.

That installs 2.4.4 instead of the earlier version.

现在,即使在我pip卸载psycopg2并尝试使用正确的版本重新安装后,pip似乎仍在重新使用它首次下载的缓存.

Now even after I pip uninstall psycopg2 and attempt to reinstall with the correct version, it appears that pip is re-using the cache it downloaded the first time.

如何强制pip清除其下载缓存并使用命令中包含的特定版本?

How can I force pip to clear out its download cache and use the specific version I'm including in the command?

推荐答案

如果使用的是pip 6.0或更高版本,请尝试添加

If using pip 6.0 or newer, try adding the --no-cache-dir option.

如果使用早于pip 6.0的pip,请使用pip install -U pip对其进行升级.

If using pip older than pip 6.0, upgrade it with pip install -U pip.

这篇关于删除点子的缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆