这些文件会被自动删除吗?还是会存储在特定位置?我尝试通过 pip 下载一个包,但在下载了几个文件后失败了。现在我想知道如果由于失败而没有自动删除这些下载的文件,该如何删除它们。由于包尚未安装,我无法安装pip uninstall
它。我使用包的名称 (tickeys) 进行了基本文件搜索,结果是一个名为 tickeys.log 的文件。我能确定在安装包期间没有剩余下载的其他文件吗?
$ pip install tickeys
Collecting tickeys
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading tickeys-0.2.5.tar.gz (5.3MB)
100% |████████████████████████████████| 5.3MB 179kB/s
Collecting cython==0.20.2 (from tickeys)
Downloading Cython-0.20.2-cp27-cp27mu-manylinux1_x86_64.whl (4.9MB)
100% |████████████████████████████████| 4.9MB 215kB/s
Collecting kivy==1.9.0 (from tickeys)
Downloading Kivy-1.9.0.tar.gz (16.2MB)
100% |████████████████████████████████| 16.2MB 76kB/s
Complete output from command python setup.py egg_info:
Cython is missing, its required for compiling kivy !
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-iseWBO/kivy/setup.py", line 173, in <module>
from Cython.Distutils import build_ext
ImportError: No module named Cython.Distutils
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iseWBO/kivy/
答案1
我可以回答apt-get
。来自man apt-get
:
clean
clean clears out the local repository of retrieved package files.
It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/.
--- *snip* ---
/var/cache/apt/archives/
Storage area for retrieved package files. Configuration Item:
Dir::Cache::Archives.
/var/cache/apt/archives/partial/
Storage area for package files in transit. Configuration Item:
Dir::Cache::Archives (partial will be implicitly appended)
因此,部分下载的文件会apt-get
驻留在其中/var/cache/apt/archives/partial
,并且可以通过操作删除clean
。