24-S1-2-C-Moral-Decisions / LandingSite

This is an archive of all the files used in the project.
0 stars 0 forks source link

Insufficient Disk Space Error During Python Environment Setup for Users #6

Closed Xinlong-Wu closed 7 months ago

Xinlong-Wu commented 7 months ago

Describe the bug

When trying to automatically set up Python environments for multiple users on our system, the process fails with an error indicating there is no space left on the device. This issue arises when executing a Python script designed to install separate virtual environments for each user, suggesting that the cumulative size of these environments exceeds the available disk space.

To Reproduce

Execute the Python script designed to set up individual virtual environments for each user. uses venv to create these environments and then installs a predefined set of packages from a requirements.txt file.

After successfully setting up environments for a few users, the script fails for subsequent users with an error message: OSError: [Errno 28] No space left on device. Check the disk usage with df -h and note that the partition used for these installations is at 100% capacity. The issue seems to be related to the cumulative size of the environments and the limited disk space available.

Expected behavior

The script should complete the setup of individual Python environments for all specified users without encountering disk space issues. Ideally, the system should either have sufficient space to accommodate all environments or manage space more efficiently to prevent such errors.

Additional context

This disk space issue has halted our ability to provide necessary development environments for our team, affecting productivity. Immediate solutions or workarounds would be highly beneficial, such as optimizing the environment setup to use less space or suggestions for cleaning up the disk to ensure sufficient space for all environments. Additionally, advice on monitoring tools or practices to prevent this issue from recurring would be appreciated.

Xinlong-Wu commented 7 months ago

Solution: Will setup env globally so that not necessary to install for every one