search

Home  >  Q&A  >  body text

python - click已经安装好了 仍然提示ImportError: No module named click

今天在编译一个文档的时候报错提示未安装 ImportError: No module named click, 执行了 pip list 检查发现 click 是已经安装好的,请教如何解决这个问题

pip list|grep click
click (6.6)

我还安装了 virtualenv 不知道这个包会不会有什么影响

伊谢尔伦伊谢尔伦2803 days ago1476

reply all(4)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 17:48:41

    It’s very simple. First check the python path you are currently executing, whether it is /usr/bin/python or something else. Then there will be a pip under the same path, such as /usr/bin/pip, and then execute /usr/bin/pip install click, this will be fine

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:48:41

    First of all, you mentioned that you installed virtualenv, then you need to determine one thing, whether you installed click in the system environment or virtualenv environment.
    Is the python running in the system environment or virtualenv environment?

    If it is correct, then you need to determine the package version issue.
    Hope it helps.

    reply
    0
  • 迷茫

    迷茫2017-04-17 17:48:41

    The python interpreter you imported is not the same as the one you installed click

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:48:41

    First enter the virtual environment of virtualenv, and then execute your script, it will usually be there. Also, you can use sys to insert the directory of your virtual environment into it

    import sys
    sys.path.insert(0,‘您的虚拟环境的目录’)

    reply
    0
  • Cancelreply