gpt4 book ai didi

python-2.7 - 如何在ubuntu上安装scrapy?

转载 作者:行者123 更新时间:2023-12-04 09:14:53 25 4
gpt4 key购买 nike

我知道安装scrapy应该先安装w3lib,所以我先安装w3lib,但是当我在python ide中导入scrapy时,程序崩溃了。
错误:

creating Twisted.egg-info

writing requirements to Twisted.egg-info\requires.txt

writing Twisted.egg-info\PKG-INFO

writing top-level names to Twisted.egg-info\top_level.txt

writing dependency_links to Twisted.egg-info\dependency_links.txt

writing manifest file 'Twisted.egg-info\SOURCES.txt'

warning: manifest_maker: standard file '-c' not found



reading manifest file 'Twisted.egg-info\SOURCES.txt'

writing manifest file 'Twisted.egg-info\SOURCES.txt'

copying twisted\internet\_sigchld.c -> build\lib.win-amd64-2.7\twisted\internet

creating build\lib.win-amd64-2.7\twisted\internet\iocpreactor\iocpsupport

copying twisted\internet/iocpreactor/iocpsupport\iocpsupport.c -> build\lib.win-amd64-2.7\twisted\internet/iocpreactor/i
ocpsupport

copying twisted\internet/iocpreactor/iocpsupport\winsock_pointers.c -> build\lib.win-amd64-2.7\twisted\internet/iocpreac
tor/iocpsupport

copying twisted\python\_epoll.c -> build\lib.win-amd64-2.7\twisted\python

copying twisted\python\_initgroups.c -> build\lib.win-amd64-2.7\twisted\python

copying twisted\python\sendmsg.c -> build\lib.win-amd64-2.7\twisted\python

copying twisted\runner\portmap.c -> build\lib.win-amd64-2.7\twisted\runner

copying twisted\test\raiser.c -> build\lib.win-amd64-2.7\twisted\test

running build_ext

怎么了?

最佳答案

这是我在ubuntu上安装scrapy的方式:

sudo apt-get update
sudo apt-get install python-pip build-essential python-dev libxslt-dev libxml2-dev
sudo -H pip install Scrapy
scrapy version

解决我的问题的重要事情是 sudo -H pip install Scrapy特别是 -H旗帜。

我也退出了终端并启动了一个新终端以确保正确设置了所有环境变量

关于python-2.7 - 如何在ubuntu上安装scrapy?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22556965/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com