【问题标题】:ModuleNotFoundError while executing a bazel scriptModuleNotFoundError while executing a bazel script
【发布时间】:2022-12-01 21:10:25
【问题描述】:

I have a python file main.py in which I am importing github package [import github] I have created a build file as follows:

py_binary(
    name = "main",
    srcs = ["main.py"],
    visibility = ["//visibility:public"]
)

When I run this through Bazel command, bazel run: main, I am gettingModuleNotFoundError: No module named 'github'.

Can someone please tell how to include python libraries inside build file and run through Bazel?

Note:I have already installed github (version: 1.2.7) through Python and it is getting updated using pip list from command prompt

【问题讨论】:

    标签: python build bazel modulenotfounderror


    【解决方案1】:

    You can build the python basic bazel example using this link for Bazel Python code build. This. is a good reference to start a one

    【讨论】:

      猜你喜欢
      • 2022-10-20
      • 1970-01-01
      • 2022-12-26
      • 2016-01-31
      • 2022-12-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-19
      • 1970-01-01
      相关资源
      最近更新 更多