Python pip安装和pip下载失败,没有空间错误,尽管有足够的空间
我在运行Python pip安装和pip下载失败,没有空间错误,尽管有足够的空间,python,download,pip,installation,Python,Download,Pip,Installation,我在运行pip install以便在现有环境中安装tensorflow时遇到了问题。然而,它已经崩溃,并没有空间错误。在我的研究中,我发现pip默认情况下会将其包下载到/tmp。因为它位于根目录下,所以我尝试为脱机安装进行pip下载,将文件下载到/home下的目录中。此操作失败,并出现相同的错误 pip download --no-cache-dir tensorflow -d /home/profile1/tmp/ #downloads several packages Traceback
pip install
以便在现有环境中安装tensorflow时遇到了问题。然而,它已经崩溃,并没有空间错误。在我的研究中,我发现pip默认情况下会将其包下载到/tmp。因为它位于根目录下,所以我尝试为脱机安装进行pip下载,将文件下载到/home下的目录中。此操作失败,并出现相同的错误
pip download --no-cache-dir tensorflow -d /home/profile1/tmp/
#downloads several packages
Traceback (most recent call last):
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/commands/download.py", line 135, in run
resolver.resolve(requirement_set)
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement
hashes=hashes,
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 287, in unpack_url
hashes=hashes,
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 164, in unpack_http_url
unpack_file(from_path, location, content_type)
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/utils/unpacking.py", line 252, in unpack_file
flatten=not filename.endswith('.whl')
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/site-packages/pip/_internal/utils/unpacking.py", line 139, in unzip_file
shutil.copyfileobj(fp, destfp)
File "/home/profile1/anaconda3/envs/testinstall/lib/python3.6/shutil.py", line 82, in copyfileobj
fdst.write(buf)
OSError: [Errno 28] No space left on device
在使用'df-h/home'时,我发现文件系统中还有20GB的空间,所以这没有任何意义。还有什么我能做的吗
我还能够确认,这只是与皮普;我可以使用conda安装来获取tensorflow,但不能使用pip。此外,我在尝试下载torch时发现了相同的错误。问题在于/tmp目录已满。 对于这个问题,有一些解决方法:
- 清除/tmp目录中不必要的文件
- 将TMPDIR环境变量设置为另一个目录,然后运行pip
- 看看是否可以通过gpart(ed)增加/tmp目录的空间