Skip to content

Commit

Permalink
feat: adding python install guide (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
DEV-DIBSTER authored Dec 5, 2024
2 parents 9d4546b + 8c2f755 commit 207b9af
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const navLinks: Link[] = [
{ label: "SFTP Using VSCode", link: "/advanced/vscode-sftp" },
{ label: "ShareX Setup", link: "/advanced/sharex-setup" },
{ label: "NVM Setup", link: "/advanced/nvm" },
{ label: "Python: Out of Space Error", link: "/advanced/python-install" },
],
},
{
Expand Down
45 changes: 45 additions & 0 deletions pages/advanced/python-install.mdx
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>

0 comments on commit 207b9af

Please sign in to comment.