Python module not found

前端 未结 2 854
忘掉有多难
忘掉有多难 2021-01-21 06:27

How do I import pyBarcode from the Python interpreter? According to the pyBarcode documentation the first step is to import barcode. When I try that it says there i

2条回答
  •  情深已故
    2021-01-21 07:03

    Make sure that the directory that contains the module is in your PYTHONPATH environment variable.

    Alternatively, you can use

    import sys
    sys.path.append(r"C:\path to pyBarcode")
    import barcode
    

提交回复
热议问题