删除点子的缓存? [英] Removing pip's cache?
问题描述
我需要专门安装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?
推荐答案
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屋!