[英]Importing module from Python non standard library
I am a beginner here.我是这里的初学者。 I am trying to use a bank simulator module in Python, whose name is banksim, but I do not get to do so.
我正在尝试在 Python 中使用银行模拟器模块,其名称为 banksim,但我不会这样做。 If I write the code
import banksim
, an error is returned.如果我编写代码
import banksim
,则会返回错误。 Furthermore, there is no pip install
mentioned by the developer of the aforementioned module.此外,上述模块的开发人员没有提到
pip install
。 Could anyone please help me to solve this issue?谁能帮我解决这个问题? Thanks indeed!
确实谢谢!
The module is in: https://github.com/banking-project/banksim模块在: https://github.com/banking-project/banksim
How can I use it?我该如何使用它?
You can just clone the repository or download it as a zip and extract it.您可以克隆存储库或将其下载为 zip 并解压缩。 Just copy the
banksim
folder into the root folder of your project you want to use the module in and import it from there.只需将
banksim
文件夹复制到您要在其中使用模块的项目的根文件夹中,然后从那里导入它。
Also run pip install -r requirements.txt
for the requirements.txt
in the repository.还为存储库中的
requirements.txt
运行pip install -r requirements.txt
。
Create a text file called requirements.txt
inside the folder that contains the pip.exe
.在包含
pip.exe
的文件夹中创建一个名为requirements.txt
的文本文件。
The content of the file should be:该文件的内容应为:
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!)
Then run pip install -r requirements.txt
in your command prompt.然后在命令提示符下运行
pip install -r requirements.txt
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.