鱼C论坛

 找回密码
 立即注册
查看: 1435|回复: 4

scrapy 安装问题

[复制链接]
发表于 2020-12-22 21:02:01 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -Id:\program\python\include -Id:\program\python\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/twisted/test/raiser.c /Fobuild\temp.win-amd64-3.9\Release\src/twisted/test/raiser.obj
    raiser.c
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:d:\program\python\libs /LIBPATH:d:\program\python\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" /EXPORT:PyInit_raiser build\temp.win-amd64-3.9\Release\src/twisted/test/raiser.obj /OUT:build\lib.win-amd64-3.9\twisted\test\raiser.cp39-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.9\Release\src/twisted/test\raiser.cp39-win_amd64.lib
    raiser.obj : warning LNK4197: export 'PyInit_raiser' specified multiple times; using first specification
       Creating library build\temp.win-amd64-3.9\Release\src/twisted/test\raiser.cp39-win_amd64.lib and object build\temp.win-amd64-3.9\Release\src/twisted/test\raiser.cp39-win_amd64.exp
    Generating code
    Finished generating code
    building 'twisted.internet.iocpreactor.iocpsupport' extension
    creating build\temp.win-amd64-3.9\Release\src\twisted\internet
    creating build\temp.win-amd64-3.9\Release\src\twisted\internet\iocpreactor
    creating build\temp.win-amd64-3.9\Release\src\twisted\internet\iocpreactor\iocpsupport
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -Id:\program\python\include -Id:\program\python\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c /Fobuild\temp.win-amd64-3.9\Release\src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.obj
    iocpsupport.c
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2229): warning C4047: '=': 'std::__pyx_t_11iocpsupport_HANDLE' differs in levels of indirection from 'HANDLE'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2377): warning C4022: 'CreateIoCompletionPort': pointer mismatch for actual parameter 1
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2377): warning C4022: 'CreateIoCompletionPort': pointer mismatch for actual parameter 2
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2377): warning C4047: '=': 'std::__pyx_t_11iocpsupport_HANDLE' differs in levels of indirection from 'HANDLE'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2492): warning C4022: 'GetQueuedCompletionStatus': pointer mismatch for actual parameter 1
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2838): warning C4022: 'PostQueuedCompletionStatus': pointer mismatch for actual parameter 1
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(2949): warning C4022: 'CloseHandle': pointer mismatch for actual parameter 1
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(3292): warning C4996: 'PyObject_AsReadBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(343): note: see declaration of 'PyObject_AsReadBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(4932): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(354): note: see declaration of 'PyObject_AsWriteBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(5149): warning C4996: 'PyObject_AsReadBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(343): note: see declaration of 'PyObject_AsReadBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(5786): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(354): note: see declaration of 'PyObject_AsWriteBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6146): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(354): note: see declaration of 'PyObject_AsWriteBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6164): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(354): note: see declaration of 'PyObject_AsWriteBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6182): warning C4996: 'PyObject_AsWriteBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(354): note: see declaration of 'PyObject_AsWriteBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(6509): warning C4996: 'PyObject_AsReadBuffer': deprecated in 3.0
    d:\program\python\include\abstract.h(343): note: see declaration of 'PyObject_AsReadBuffer'
    src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(7614): error C2039: 'tp_print': is not a member of '_typeobject'
    d:\program\python\include\cpython/object.h(193): note: see declaration of '_typeobject'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\program\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\star\\AppData\\Local\\Temp\\pip-install-sac9ugzx\\twisted_08f7c9d195f649a79225f9d171856564\\setup.py'"'"'; __file__='"'"'C:\\Users\\star\\AppData\\Local\\Temp\\pip-install-sac9ugzx\\twisted_08f7c9d195f649a79225f9d171856564\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\star\AppData\Local\Temp\pip-record-jt61vtla\install-record.txt' --single-version-externally-managed --home 'C:\Users\star\AppData\Local\Temp\pip-target-qfmf25dt' --compile --install-headers 'C:\Users\star\AppData\Local\Temp\pip-target-qfmf25dt\include\python\Twisted' Check the logs for full command output.
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-12-22 21:15:38 From FishC Mobile | 显示全部楼层
去http://www.lfd.uci.edu/~gohlke/pythonlibs/搜索scrapy,下载对应版本的whl安装包,在whl所在文件夹空白处按住shift加右键,选择在此处打开powershell或命令窗口,输入pip install whl的完整文件名
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-12-22 21:21:44 | 显示全部楼层
hrp 发表于 2020-12-22 21:15
去http://www.lfd.uci.edu/~gohlke/pythonlibs/搜索scrapy,下载对应版本的whl安装包,在whl所在文件夹空白 ...

我试过不行
pip install C:\Users\star\Desktop Twisted-20.3.0-cp39-cp39-win_amd64.whl
之后运行pip install --target=D:\Program\Python\Scripts scrapy
提示Microsoft Visual C++ 14.0 is required
我安装Microsoft Visual C++ Build Tools
再运行pip install --target=D:\Program\Python\Scripts scrapy
就变成这样了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-12-22 22:00:01 From FishC Mobile | 显示全部楼层
本帖最后由 hrp 于 2020-12-22 22:26 编辑
1464019230 发表于 2020-12-22 21:21
我试过不行
pip install C:%users\star\Desktop Twisted-20.3.0-cp39-cp39-win_amd64.whl
之后运行pip ...


安装build tools或者vs2019是解决方法之一,但可能要配置好build tools或者vs的环境变量,如果你没有安装多个Python环境,那pip命令就没必要加其他参数,直接pip install scrapy就行了。就算你安装了多个Python环境,你只要进入你需要安装scrapy的环境的Scripts目录,在那里按住shift加右键选打开命令窗口,直接pip install scrapy就可以了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-12-22 22:20:38 | 显示全部楼层
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-17 01:02

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表