2014-06-30 85 views
2

我想在Windows上安装Scrapy,并遵循Scrapy安装指南中的步骤来安装所有的依赖项。但是,我得到了以下错误消息,当我试图用easy_install的Scrapy安装错误点和easy_install

Download error on https://pypi.python.org/simple/Scrapy/ : [Errno 10061] No connection could be made because the target machine actively refused it -- Some packages may not be found! Couldn't find index page for 'Scrapy' (maybe misspelled?)

Scanning index of all packages (this may take a while) Reading https://pypi.python.org/simple/ Download error on https://pypi.python.org/simple/ : [Errno 10061] No connection could be made because the target machine actively refused it -- Some packages may not be found! No local packages or download links found for Scrapy error: Could not find suitable distribution for Requirement.parse('Scrapy')

我还试图用点子,但它无法正常工作或:

Downloading/unpacking Scrapy Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement Scrapy Cleaning up... No distributions at all found for Scrapy

我去pip.log它说

Could not fetch URL https://pypi.python.org/simple/Scrapy/ : connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/Scrapy/ (Caused by : [Errno 10061] No connection could be made because the target machine actively refused it) Will skip URL https://pypi.python.org/simple/Scrapy/ when looking for download links for Scrapy

我可以访问https://pypi.python.org/simple/Scrapy/直接从互联网expl但不知道为什么pip或easy_install无法访问链接。

我正在使用Anaconda python,因此easy_install和pip已经是包的一部分。我也有以下错误安装在pywin32的最后阶段:

close failed in file object destructor:

sys.excepthook is missing

lost sys.stderr

这是easy_install的原因和PIP失败了吗?任何人都可以帮忙吗?

感谢

+0

可能的[在Windows 7上安装Scrapy-Python和Easy \ _install]的重复(https://stackoverflow.com/questions/28150433/installing-scrapy-python-and-easy-install-on-windows-7) –

回答

0

一步一步的方式,在Windows 7

  1. 安装scrapy从Python Download link安装Python 2.7(一定要安装Python 2.7,只是因为目前scrapy不适用于Python3在Windows中)
  2. 在pyhton安装过程中,可以使用复选框将python路径添加到系统变量中,然后单击该选项。否则,您可以手动添加路径变量。 您需要调整PATH环境变量以包含Python可执行文件和其他脚本的路径。 以下路径需要如果在添加路径变量请参见本link
    3.更新路径打开管理模式命令提示符任何其他问题,要添加到PATH C:\Python27\;C:\Python27\Scripts\; windows add path variable

运行::\python27\python.exe c:\python27\tools\scripts\win_add2path.py。关闭命令提示符窗口并重新打开它,以使更改生效,运行以下命令,检查添加到路径变量的事情。
python -–version这将给输出Python 2.7.12(您的版本可能比我的不同)
pip --version,这将给作为pip 9.0.1输出(您的版本可能比我的不同)
4.您需要安装Visual Basic C++ Python的编译器。你可以从Download link
下载那个5.然后你安装libxml来安装scrapy使用的python库。您可以通过在命令提示符下编写命令pip install libxml来下载它。 但是如果您在安装pip时遇到一些问题,您可以从http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml下载下载它libxml根据您的系统架构打包。打开命令提示符进入该下载目录并pip install NAME_OF_PACKAGE.whl
6.从Download link安装pywin32。 确保您下载符合您的系统
7.然后打开命令提示符架构(win32的或AMD64),并运行此命令pip install scrapy
我希望这将在成功安装scrapy 8.帮助仅供参考使用您可以这些链接Scrapy official PageBlog on how to install scrapy on windows

0

如何在Windows 8.1上的Python 3.6安装Scrapy 1.4专业版64位

pip install virtualenv 
pip install virtualenvwrapper 
pip install virtualenvwrapper-win 
mkvirtualenv my_scrapy_project 

我建议使用virtualenv。在我的示例中,我为我的虚拟环境使用名称my_scrapy_project。 如果你想出去的virtualenv,简单地输入停用,如果你想回去到,只需键入workon my_scrapy_project

pip install lxml-4.1.1-cp36-cp36m-win32.whl

pip install scrapy 

,这是所有,它应该工作。