python -m的可用情况

今天conda安装环境的时候,发现pip安装失败,报错


INFO: This is taking longer than usual. You might need to provide the dependency resolver wit        h stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl +         C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/sur        veys/backtracking

改用python -m pip install xxx,安装成功
于是研究了一下原因:python -m的官方释义是将模块当做脚本运行,优点在于可以指定python解释器,在linux下可以运行pip -V查看当前用的是那个python解释器来运行pip

你可能感兴趣的:(python,python)