python - click已经安装好了 仍然提示ImportError: No module named click
伊谢尔伦
伊谢尔伦 2017-04-17 17:46:41
0
4
1485

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

pip list|grep click
click (6.6)

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

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(4)
左手右手慢动作

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

刘奇

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.

迷茫

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

大家讲道理

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,‘您的虚拟环境的目录’)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template