Urinx / WeixinBot

网页版微信API,包含终端版微信及微信机器人
Apache License 2.0
7.21k stars 1.98k forks source link

ImportError: No module named 'qrcode' #219

Open yangezheng opened 7 years ago

yangezheng commented 7 years ago

用python3 执行 weixin.py 出现import error。

yann@Yannch:~/Projects/WeixinBot/wxbot_demo_py3$ python3 weixin.py Traceback (most recent call last): File "weixin.py", line 3, in import qrcode ImportError: No module named 'qrcode'


qrcode 我已经是安装了的

yann@Yannch:~/Projects/WeixinBot/wxbot_demo_py3$ pip install qrcode Requirement already satisfied: qrcode in /usr/local/lib/python2.7/dist-packages Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from qrcode)

miracle244 commented 7 years ago

我也碰到了这个问题,qrcode已经装了,但还是报这个错。

Collecting colorama (from -r requirements.txt (line 1)) Using cached colorama-0.3.9-py2.py3-none-any.whl Collecting coloredlogs (from -r requirements.txt (line 2)) Using cached coloredlogs-7.3-py2.py3-none-any.whl Collecting humanfriendly (from -r requirements.txt (line 3)) Using cached humanfriendly-4.4.1-py2.py3-none-any.whl Collecting lxml (from -r requirements.txt (line 4)) Downloading lxml-3.8.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (7.8MB) 100% |████████████████████████████████| 7.9MB 36kB/s Collecting qrcode (from -r requirements.txt (line 5)) Using cached qrcode-5.3-py2.py3-none-any.whl Collecting requests (from -r requirements.txt (line 6)) Downloading requests-2.18.4-py2.py3-none-any.whl (88kB) 100% |████████████████████████████████| 92kB 55kB/s Collecting six (from -r requirements.txt (line 7)) Downloading six-1.10.0-py2.py3-none-any.whl Collecting requests_toolbelt (from -r requirements.txt (line 8)) Using cached requests_toolbelt-0.8.0-py2.py3-none-any.whl Collecting pyqrcode (from -r requirements.txt (line 9)) Using cached PyQRCode-1.2.1.zip Collecting certifi (from -r requirements.txt (line 10)) Using cached certifi-2017.7.27.1-py2.py3-none-any.whl Collecting idna<2.7,>=2.5 (from requests->-r requirements.txt (line 6)) Downloading idna-2.6-py2.py3-none-any.whl (56kB) 100% |████████████████████████████████| 61kB 23kB/s Collecting chardet<3.1.0,>=3.0.2 (from requests->-r requirements.txt (line 6)) Using cached chardet-3.0.4-py2.py3-none-any.whl Collecting urllib3<1.23,>=1.21.1 (from requests->-r requirements.txt (line 6)) Using cached urllib3-1.22-py2.py3-none-any.whl Installing collected packages: colorama, humanfriendly, coloredlogs, lxml, six, qrcode, certifi, idna, chardet, urllib3, requests, requests-toolbelt, pyqrcode Running setup.py install for pyqrcode ... done Successfully installed certifi-2017.7.27.1 chardet-3.0.4 colorama-0.3.9 coloredlogs-7.3 humanfriendly-4.4.1 idna-2.6 lxml-3.8.0 pyqrcode-1.2.1 qrcode-5.3 requests-2.18.4 requests-toolbelt-0.8.0 six-1.10.0 urllib3-1.22

miracle244 commented 7 years ago

此问题已解决,原因是Pip3 安装的库文件路径与python运行的库文件路径不一致导致

follyxing commented 7 years ago

pip3 install -r requirements.txt