-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding python install guide (#156)
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Fixing `EnvironmentError - No space left on device` Error | ||
|
||
Please note that this **will not give you more disk space**, this will **increase your TEMP storage size**, which is what causes this error message. This temporary storage is stored within your container. | ||
|
||
## Prerequisites: | ||
|
||
- PYTHON Server | ||
|
||
## Directions: | ||
|
||
On the PYTHON server, follow these steps: | ||
|
||
Create a new directory, in the `home/container` directory, named `TEMP` | ||
|
||
If your issue is occurring **whilst running PIP to install `requirements.txt`**, use: | ||
```text | ||
pip3 install --cache-dir="$HOME/TEMP/" -r requirements.txt | ||
``` | ||
|
||
If your issue is occurring **whilst running code**, you need to export the `TEMP` directory, using: | ||
```text | ||
export TMPDIR=$HOME/TEMP | ||
``` | ||
|
||
**Please note that the TMPDIR export will be wiped on reboot.** | ||
|
||
## Making the TMPDIR permanent: | ||
|
||
create a file, named `run.sh` and set its contents to: | ||
|
||
```text | ||
export TMPDIR=$HOME/TEMP | ||
# replace this comment (this line) with your current Startup Command | ||
``` | ||
Then set your Startup Command in the `Startup category` to `bash run.sh` | ||
|
||
|
||
<Tip>Splitting up your `requirements.txt` file also helps out if you're getting this error whilst installing PIP packages.</Tip> | ||
|
||
<Tip>Make sure your `run.sh` is in a directory which can reach any file listed in your Startup Command written to this file.</Tip> | ||
|
||
<Tip> | ||
Thank you to alphaspiderman (212992967462486016) for creating this guide on the Python Support channel. | ||
</Tip> |