Collecting package metadata (repodata.json): / Killed

Viewed 3918

I have a fresh EC2 Ubuntu 18.04 I have installed anaconda as it it in the official guide https://docs.anaconda.com/anaconda/install/linux/

apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 
libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 
libxtst6 64 bit installation 

But then I have YML files that I have used to create conda environments before on other EC2s and when I ma tiring to setup a new environment with it

ubuntu@ip........:~$ conda env create --name my_env_name --file=my_env_file.yml

it it gives me the following error

Collecting package metadata (repodata.json): / Killed

Now I am trying with the following guide

2 Answers

Adding more RAM helps I switched from 0.5 GB to 8GB RAM than the problem disappears

Assigning more RAM, as suggested in the accepted answer by @sogu, will probably cost you money.

You can alternatively solve this problem free-of-charge by assigning swap space instead. This blog post provides a simple few commands to allocate 1G of swap space, which was enough for conda to install most packages in my case:

sudo fallocate -l 1G /swapfile 
sudo chmod 600 /swapfile 
sudo mkswap /swapfile 
sudo swapon /swapfile 
sudo cp /etc/fstab /etc/fstab.bak 
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Related