当我尝试安装pip
时,我得到了这个erorr,我尝试卸载并再次安装python,但没有任何结果。
例如,如果我想通过pip安装random
模块,我会遇到以下错误:
C:\Users\nadzi>pip install random
ERROR: Could not find a version that satisfies the requirement random (from versions: none)
ERROR: No matching distribution found for random
WARNING: You are using pip version 21.1.3; however, version 21.2.1 is available.
You should consider upgrading via the 'C:\Users\nadzi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.
它已经存在了,只需键入import random即可使用它
您不需要
pip install random
。只要做import random
random
模块位于python standard library.只需使用import random
导入即可。你不需要安装它相关问题 更多 >
编程相关推荐