English 中文(简体)
IOError: [Errno 28] 安装TensorFlow时没有装置的空间
原标题:IOError: [Errno 28] No space left on device while installing TensorFlow

我正试图利用以下指挥在我的当地司安装TentorFlow。

export TF_BINARY_URL=http://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
pip install --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL

我正在犯以下错误:

IOError: [Errno 28] No space left on device

然后,我填写了<代码>df,以便查阅:

Filesystem             1K-blocks       Used   Available Use% Mounted on
tmpfs                      10240      10240           0 100% /tmp
tmpfs                      10240      10240           0 100% /var/tmp

在<代码>/tmp或/var/tmp上下载节奏文件的情况下,我能否安装工作组? 感谢。

问题回答

通常情况下, 你们可以把环境变数猛虎人解组织用于使用一种不同于/症状或/压力的另一种目录,而且大多数方案将遵守这一规定。

你或许可以尝试,

出口TMPDIR=$HOME/tmp

然后开始安装。

您也许能够使用更换建筑ir的管道——b / some/其他/dir。

You can also change the wheel dir as can be seen here https://pip.pypa.io/en/stable/user_guide/#installation-bundles

运行<代码>pip也有助于安装。

-b, --build <dir>           Directory to unpack packages into and build in.
-t, --target <dir>          Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.
-d, --download <dir>        Download packages into <dir> instead of installing them, regardless of what is already installed.
--src <dir>                 Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".
export TMPDIR=/bigspace/space

Why?: It is likely that /tmp directory do not have enough space for some reason.

在管道安装期间,Pip将使用/执行目录进行安装所需的工作(例如下载源等)。

因此,如果你没有足够的空间/执行一揽子安装要求,那么你就会发现磁盘空间错误。

You can configure your /tmp directory location using below command

在“出口TMPDIR=/home/$USER/tmp”终端站安装了双管束。

Solution 1: Pip won t re-download the package in this solution but in other solutions it does

使用<代码>df-h核对现有磁场:

如果你确实需要改变症状的规模,那么你可以按新的规模重新排列:

$ sudo mount -o remount,size=10G /tmp
$ sudo mount -o remount,size=10G /var/tmp

Solution 2: You can set the environment variable TMPDIR for pip

$ export TMPDIR=$HOME/new/tmp/dir
$ pip install --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL

Solution 3: With custom cache/temp directory

$ pip install --cache-dir=$HOME/new/tmp/dir/  --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL

Solution 4: With no cache directory

pip install --no-cache-dir --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL

这部工程用于第23.1页。

您需要制定<代码>TMPDIR,并具体说明<代码>-cache-dir备选办法。

TMPDIR=/mybigtemp pip3 --cache-dir /mybigtemp  install tensorflow tensorflow_probability

参见所有Pip安装的帮助选择:

pip3 help install

根本原因为:TMPDIR违约为/tmp/tmp。 空间有限。

您可在另一个途径(如<代码>/space/enough/tmp/)上通过<代码>mkdir确定这一问题,但前提是:

......TMPDIR=/space/enough/tmp/ python -m pip install --install-option="--prefix=$PYTHONUSERBASE" --upgrade $TF_BINARY_URL

......





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签