Q:

how to create first user in psycopg2

I am trying to connect PSYCOPG2, however it is my first time doing so and I haven't created any user.  All tutorials I see supose I have already created one and I simply can't connect.  I have seen that there is a default user for Postgres and I have tried the following codes and received the following errors:
conn = psycopg2.connect(database="postgres", user="postgres", password="postgres", port=5432)
Error FATAL:  password authentication failed for user "postgres"

con = psycopg2.connect(database='postgres', user='postgres')
Error fe_sendauth: no password supplied

What else should I try, please? 

A:

Some installers ask for a password during installation (really is used for initialization of the database after installation of the software), then you need to specify this password to connect as the 'postgres' user, even from the local machine.   This is common for Windows installers.   If you don't remember what you told it, it might be easiest just to reinstall. 
Linux installers are not likely to do this, they usually use 'peer' method with no password.   But this only applies when you use a unix-domain socket to connect.   Your python code suggests that that is what you are doing (since that is usually the default on linux when no host is provided), but the log-file message suggest you specified the host of ::1 to connect to.