Solved by tengerye in post #5 
              
              
                Super wired. I finally solve the problem: in the container I executed sudo python3 XXXX. When I type whoami, it told me root. I guess it must be the problem of docker.