From 68c8e2850cd82c6939c06320cfdb89df94f721b6 Mon Sep 17 00:00:00 2001
From: Kenny <75525014+KennySB-dev@users.noreply.github.com>
Date: Thu, 5 Dec 2024 17:04:23 +0100
Subject: [PATCH 1/2] Create pythonenvironmenterror.mdx
Adds a guide to increase your TEMP folder's max storage by making it a directory on your home/container path
Guide adapted from alphaspiderman (212992967462486016)'s guide on the python support channel
https://discord.com/channels/639477525927690240/898041894746066985/980068037715705919
---
pages/guides/pythonenvironmenterror.mdx | 45 +++++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 pages/guides/pythonenvironmenterror.mdx
diff --git a/pages/guides/pythonenvironmenterror.mdx b/pages/guides/pythonenvironmenterror.mdx
new file mode 100644
index 0000000..340e784
--- /dev/null
+++ b/pages/guides/pythonenvironmenterror.mdx
@@ -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.
+
+## 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`
+
+
+Splitting up your `requirements.txt` file also helps out if you're getting this error whilst installing PIP packages.
+
+Make sure your `run.sh` is in a directory which can reach any file listed in your Startup Command written to this file.
+
+
+ Thank you to alphaspiderman (212992967462486016) for creating this guide on the Python Support channel.
+
From 8c2f7556e5ef6e1d7002ffc72d860089268d64d3 Mon Sep 17 00:00:00 2001
From: DIBSTER <76603072+DEV-DIBSTER@users.noreply.github.com>
Date: Thu, 5 Dec 2024 13:04:21 -0500
Subject: [PATCH 2/2] chore: small details and fixes
---
config.ts | 1 +
.../pythonenvironmenterror.mdx => advanced/python-install.mdx} | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
rename pages/{guides/pythonenvironmenterror.mdx => advanced/python-install.mdx} (94%)
diff --git a/config.ts b/config.ts
index acfee02..364d2d7 100644
--- a/config.ts
+++ b/config.ts
@@ -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" },
],
},
{
diff --git a/pages/guides/pythonenvironmenterror.mdx b/pages/advanced/python-install.mdx
similarity index 94%
rename from pages/guides/pythonenvironmenterror.mdx
rename to pages/advanced/python-install.mdx
index 340e784..a1e00e6 100644
--- a/pages/guides/pythonenvironmenterror.mdx
+++ b/pages/advanced/python-install.mdx
@@ -1,6 +1,6 @@
# 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.
+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: