In julia import Pkg failed to precompiling. Why and how to solve this problem?

this behavior was observed it Julia 1.8.1 and was related to number of threads for openblas during precompilation, see for more details:

You can either update Julia to the newest version (1.8.3) or change the environment variable mentioned in the thread. Let us know, if that solved your issue.