如何安装binarySearch模块?

2024-05-19 16:35:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要一个模块,你知道我怎样才能得到它吗

当前正在获取此错误代码:

  File "C:\Users\b\OneDrive\Desktop\Analyse\test_binarySearch.py", line 10, in <module>
    import binarySearch as BS

ModuleNotFoundError: No module named 'binarySearch'

Tags: 模块inpytestimportaslineonedrive
2条回答

如果已安装pip,则可以通过运行以下命令来安装binary-search

pip install binary-search

(如果没有安装pip,请参阅the documentation了解安装说明。)

然后可以在代码中导入库,如下所示:

import binary_search

打开cmd并键入:

pip install binary-search

相关问题 更多 >