I was researching about building a python environment with EC2 + Amazon Linux AMI, but I personally summarized it because the information was complicated and confused depending on the time.
It seems that python2.7 is the default in "Amazon Linux AMI 2015.03" as of the beginning of July 2015.
sudo yum -y update
python --version
> Python 2.7.9
However, when I tried to insert pandas with pip, I got an error such as something missing. It seems that you need to add make or gcc separately. Below you can find all the things that look like it.
sudo yum -y groupinstall "Development Tools"
sudo pip install pandas
By the way.
I tried to nohup, throw a batch, go home and check the situation at home, and when I run it with nohup as usual, even if I do tail -f, the print result does not come out.
nohup python my.py > out.log 2>&1 &
According to the following, if it is the default, it will be buffered until the end of processing, so it seems that you should add -u.
stackoverflow: Python - Nohup is not writing log to output file
With -u, it behaves as expected.
nohup python -u my.py > out.log 2>&1 &
For more information on options, see Home Reference )so.
-u
stdin, stdout,Forces stderr's buffer to be disabled. In the system involved, stdin, stdout,Put stderr into binary mode.
Recommended Posts