本文是在python3.6环境下安装的下面软件,如果大家和我的python版本不一致,请在页面选择符合自己版本的软件下载.

1.wheel

pip install wheel

2.lxml

下载lxml文件:https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

下载完成,鼠标右击文件-属性-安全-复制文件路径


pip install C:\Users\Administrator\Desktop\lxml-4.2.6-cp36-cp36m-win_amd64.whl

打开cmd命令行

3.PyOpenssl

下载文件pyOpenSSL

https://pypi.org/project/pyOpenSSL/#files

安装

4.Twisted

下载文件

https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

安装

5.Pywin32

下载文件pywin32

https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/

安装

6.Scrapy

pip install scrapy

7.番外篇

7.1如果遇到下面的问题

7.2请编写一个文件register.py,内容如下:

from __future__ import print_function
import sys
try:
    from winreg import *
except ImportError:
    from _winreg import *
 
# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix
 
regpath = "SOFTWARE\\Python\\Pythoncore\\{0}\\".format(version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "{0};{1}\\Lib\\;{2}\\DLLs\\".format(
    installpath, installpath, installpath)
 
 
def RegisterPy():
    try:
        reg = OpenKey(HKEY_CURRENT_USER, regpath)
    except EnvironmentError as e:
        try:
            reg = CreateKey(HKEY_CURRENT_USER, regpath)
            SetValue(reg, installkey, REG_SZ, installpath)
            SetValue(reg, pythonkey, REG_SZ, pythonpath)
            CloseKey(reg)
        except:
            print("*** Unable to register!")
            return
        print("--- Python", version, "is now registered!")
        return
    if (QueryValue(reg, installkey) == installpath and
        QueryValue(reg, pythonkey) == pythonpath):
        CloseKey(reg)
        print("=== Python", version, "is already registered!")
        return
    CloseKey(reg)
    print("*** Unable to register!")
    print("*** You probably have another Python installation!")
 
if __name__ == "__main__":
    RegisterPy()

7.3 复制python文件路径

7.4 cmd窗口执行python文件

7.5 重新执行pywin32-220.win32-py3.6.exe

8.相关文件百度网盘下载地址:

链接:https://pan.baidu.com/s/1RmtuVywW_mXs76_usU0sjA 
提取码:uakt