从 Python 个非标准库中导入模块
Importing module from Python non standard library
我是这里的初学者。我正在尝试使用 Python 中的银行模拟器模块,其名称为 banksim,但我没有这样做。如果我写代码import banksim
,就会返回一个错误。此外,上述模块的开发人员没有提到 pip install
。谁能帮我解决这个问题?非常感谢!
模块位于:
https://github.com/banking-project/banksim
如何使用它?
您可以只克隆存储库或将其下载为 zip 文件并解压缩。只需将 banksim
文件夹复制到您要在其中使用该模块的项目的根文件夹中,然后从那里导入它。
还有 运行 pip install -r requirements.txt
用于存储库中的 requirements.txt
。
在包含 pip.exe
.
的文件夹中创建一个名为 requirements.txt
的文本文件
文件内容应为:
mesa==0.8.5
#dash==0.38.0 # The core dash backend
#dash-html-components==0.13.5 # HTML components
#dash-core-components==0.43.1 # Supercharged components
#dash-table==3.5.0 # Interactive DataTable component (new!)
#dash-daq==0.1.0 # DAQ components (newly open-sourced!)
然后在命令提示符中 运行 pip install -r requirements.txt
。
我是这里的初学者。我正在尝试使用 Python 中的银行模拟器模块,其名称为 banksim,但我没有这样做。如果我写代码import banksim
,就会返回一个错误。此外,上述模块的开发人员没有提到 pip install
。谁能帮我解决这个问题?非常感谢!
模块位于: https://github.com/banking-project/banksim
如何使用它?
您可以只克隆存储库或将其下载为 zip 文件并解压缩。只需将 banksim
文件夹复制到您要在其中使用该模块的项目的根文件夹中,然后从那里导入它。
还有 运行 pip install -r requirements.txt
用于存储库中的 requirements.txt
。
在包含 pip.exe
.
requirements.txt
的文本文件
文件内容应为:
mesa==0.8.5
#dash==0.38.0 # The core dash backend
#dash-html-components==0.13.5 # HTML components
#dash-core-components==0.43.1 # Supercharged components
#dash-table==3.5.0 # Interactive DataTable component (new!)
#dash-daq==0.1.0 # DAQ components (newly open-sourced!)
然后在命令提示符中 运行 pip install -r requirements.txt
。