Python DNS module import error

后端 未结 13 1620
失恋的感觉
失恋的感觉 2020-12-03 16:39

I have been using python dns module.I was trying to use it on a new Linux installation but the module is not getting loaded. I have tried to clean up and install but the ins

13条回答
  •  [愿得一人]
    2020-12-03 17:36

    One possible reason here might be your script have wrong shebang (so it is not using python from your virtualenv). I just did this change and it works:

    -#!/bin/python
    +#!/usr/bin/env python
    

    Or ignore shebang and just run the script with python in your venv:

    $ python your_script.py
    

提交回复
热议问题