python学习点滴

1、安装qrcode:

N:\python\WXBot>weixin.py

Traceback (most recent call last):
  File "N:\python\WXBot\weixin.py", line 3, in <module>
    import qrcode
ImportError: No module named qrcode


N:\python\WXBot>c:


C:\>cd C:\Python27\Scripts


C:\Python27\Scripts>pip install qrcode
Collecting qrcode
  Using cached qrcode-5.3-py2.py3-none-any.whl
Collecting six (from qrcode)
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, qrcode
Successfully installed qrcode-5.3 six-1.10.0
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm

and.


提示缺什么就装什么,非常方便。比如这个:ImportError: No module named requests


N:\python\WXBot>c:


C:\Python27\Scripts>pip install requests
Collecting requests
  Using cached requests-2.12.1-py2.py3-none-any.whl
Installing collected packages: requests
Successfully installed requests-2.12.1

这样就安装好了。


================如果网上的版本不对,可下载到本机.

遇到过自动下载库文件下载的不对的情况,lxml-3.4.4-cp26-none-win32.whl 中的cp26表示对应的python是2.6版本的,但是我们安装的Python是2.7版本的。所以库文件和python版本要对应好!

另外win32也表示对应的python版本是32位的,如果python是64位的话,则需要下载xml-3.6.4-cp27-cp27m-win64.whl

http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml


pip install N:\python\lxml-3.6.4-cp27-cp27m-win32.whl

C:\Python27\Scripts>pip install N:\python\lxml-3.6.4-cp27-cp27m-win32.whl
Processing n:\python\lxml-3.6.4-cp27-cp27m-win32.whl
Installing collected packages: lxml
Successfully installed lxml-3.6.4

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值