环境:

Win7专业版(X64) 机器上有安装Vs2010。

Python 2.7.5

安装:

  1. install python 
    http://www.python.org/downloads/windows/
  2. add enviroment 
    add C:\Python27 and C:\Python27\scripts in your PATH.
    http://www.nextofwindows.com/how-to-addedit-environment-variables-in-windows-7/
  3. install OpenSSL
    http://slproweb.com/products/Win32OpenSSL.html download Visual C++ 2008 Redistributables and Win64 OpenSSL v1.0.1f
    add C:\OpenSSL-Win64\bin in your PATH
  4. install easy_install 
    https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe#md5=57e1e64f6b7c7f1d2eddfc9746bbaf20

    注意:win7 64位必须使用ez_setup.py进行安装。方法是下载ez_setup.py后,在cmd下执行 python ez_setup.py,即可自动安装setuptools。目前没有直接的exe安装版本。

  5. install pywin32
     https://pypi.python.org/pypi/setuptools#files 选择最新的下载
  6. install twisted
    https://pypi.python.org/packages/2.7/T/Twisted/Twisted-13.0.0.win32-py2.7.msi#md5=c2d453a344f56cf6f77204c5769288c0
  7. install zope interface
    https://pypi.python.org/pypi/zope.interface/4.1.0 选择倒数第二个 zope.interface-4.1.0.win32-py2.7.exe 
  8. install lxml
    lxml-3.3.2.win32-py2.7.exe
  9. install pyopenssl
    http://www.egenix.com/cryptodownload/?file=egenix-pyopenssl-0.13.0_1.0.0g_1.win-amd64-py2.7.msi(重点)
    安装完成后,在python中输入import OpenSSL 无错则安装成功
    • Install pip from https://pip.pypa.io/en/latest/installing.html

      Now open a Command prompt to check pip is installed correctly:

      pip --version
      
    • At this point Python 2.7 and pip package manager must be working, let’s install Scrapy:

      pip install Scrapy

问题:

  1. unable to find vcvarsall.bat

    打开“<python安装目录>\Lib\distutils\msvc9compiler.py”

    找到 toolskey = “VS%0.f0COMNTOOLS” % version,直接修改为 toolskey = ”VS100COMNTOOLS” 

参考:

  1. http://steamforge.net/wiki/index.php/How_to_Install_Scrapy_in_64-bit_Windows_7
  2. http://doc.scrapy.org/en/latest/intro/install.html

转载于:https://www.cnblogs.com/bigdatafly/articles/5135327.html

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐