Python module not found

前端 未结 2 806
忘掉有多难
忘掉有多难 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:02

    Before using (importing) pyBarcode, you must install it, for instance with

    pip install pyBarcode
    
    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题