首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装twisted (获取scrapy)

无法安装twisted (获取scrapy)
EN

Stack Overflow用户
提问于 2020-02-23 01:16:30
回答 1查看 1.3K关注 0票数 2

标题中的所有内容我正在尝试安装scrapy,当我安装twisted时,我得到了这个错误。我不知道怎么解决这个问题。我试着卸载Python,但我没能成功(我想)。所以我下载了Python 3.8并重新安装/覆盖了它。已安装pip,但出现相同的错误。如果能帮上一点忙,我们将不胜感激。(我不得不删除大部分错误,即96000行复制内容),谢谢!

~ pielov$ pip3 install twisted

代码语言:javascript
复制
Collecting twisted
  Using cached Twisted-19.10.0.tar.bz2 (3.1 MB)
Requirement already satisfied: zope.interface>=4.4.2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from twisted) (4.7.1)
Requirement already satisfied: constantly>=15.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from twisted) (15.1.0)
Requirement already satisfied: incremental>=16.10.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from twisted) (17.5.0)
Requirement already satisfied: Automat>=0.3.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from twisted) (20.2.0)
Requirement already satisfied: hyperlink>=17.1.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from twisted) (19.0.0)
Requirement already satisfied: PyHamcrest>=1.9.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from twisted) (2.0.0)
Requirement already satisfied: attrs>=17.4.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from twisted) (19.3.0)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from zope.interface>=4.4.2->twisted) (41.2.0)
Requirement already satisfied: six in ./Library/Python/3.8/lib/python/site-packages (from Automat>=0.3.0->twisted) (1.14.0)
Requirement already satisfied: idna>=2.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from hyperlink>=17.1.1->twisted) (2.9)
Installing collected packages: twisted
    Running setup.py install for twisted ... error
代码语言:javascript
复制
 ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/18/2kjpj9h55cbb179bxm6mrgwr0000gn/T/pip-install-3bd0hn62/twisted/setup.py'"'"'; __file__='"'"'/private/var/folders/18/2kjpj9h55cbb179bxm6mrgwr0000gn/T/pip-install-3bd0hn62/twisted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/18/2kjpj9h55cbb179bxm6mrgwr0000gn/T/pip-record-klnqvqm2/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/twisted
         cwd: /private/var/folders/18/2kjpj9h55cbb179bxm6mrgwr0000gn/T/pip-install-3bd0hn62/twisted/
    Complete output (952 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    creating build/lib.macosx-10.9-x86_64-3.8/twisted
    running egg_info
    writing src/Twisted.egg-info/PKG-INFO
    writing dependency_links to src/Twisted.egg-info/dependency_links.txt
    writing entry points to src/Twisted.egg-info/entry_points.txt
    writing requirements to src/Twisted.egg-info/requires.txt
    writing top-level names to src/Twisted.egg-info/top_level.txt
    reading manifest file 'src/Twisted.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*.misc' found under directory 'src/twisted'
    warning: no previously-included files matching '*.bugfix' found under directory 'src/twisted'
    warning: no previously-included files matching '*.doc' found under directory 'src/twisted'
    warning: no previously-included files matching '*.feature' found under directory 'src/twisted'
    warning: no previously-included files matching '*.removal' found under directory 'src/twisted'
    warning: no previously-included files matching 'NEWS' found under directory 'src/twisted'
    warning: no previously-included files matching 'README' found under directory 'src/twisted'
    warning: no previously-included files matching 'newsfragments' found under directory 'src/twisted'
    warning: no previously-included files found matching 'src/twisted/topfiles/CREDITS'
    warning: no previously-included files found matching 'src/twisted/topfiles/ChangeLog.Old'
    warning: no previously-included files found matching 'pyproject.toml'
    warning: no previously-included files found matching 'codecov.yml'
    warning: no previously-included files found matching 'appveyor.yml'
    warning: no previously-included files found matching '.coveralls.yml'
    warning: no previously-included files found matching '.circleci'
    warning: no previously-included files matching '*' found under directory '.circleci'
    no previously-included directories found matching 'bin'
    no previously-included directories found matching 'admin'
    no previously-included directories found matching '.travis'
    no previously-included directories found matching '.github'
    warning: no previously-included files found matching 'docs/historic/2003'
    warning: no previously-included files matching '*' found under directory 'docs/historic/2003'
    writing manifest file 'src/Twisted.egg-info/SOURCES.txt'
    copying src/twisted/test/cert.pem.no_trailing_newline -> build/lib.macosx-10.9-x86_64-3.8/twisted/test
    copying src/twisted/test/key.pem.no_trailing_newline -> build/lib.macosx-10.9-x86_64-3.8/twisted/test
    copying src/twisted/test/server.pem -> build/lib.macosx-10.9-x86_64-3.8/twisted/test
    copying src/twisted/test/test_defer.py.3only -> build/lib.macosx-10.9-x86_64-3.8/twisted/test
    copying src/twisted/python/twisted-completion.zsh -> build/lib.macosx-10.9-x86_64-3.8/twisted/python
    creating build/lib.macosx-10.9-x86_64-3.8/twisted/python/_pydoctortemplates
    copying src/twisted/python/_pydoctortemplates/common.html -> build/lib.macosx-10.9-x86_64-3.8/twisted/python/_pydoctortemplates
    copying src/twisted/python/_pydoctortemplates/index.html -> build/lib.macosx-10.9-x86_64-3.8/twisted/python/_pydoctortemplates
    copying src/twisted/python/_pydoctortemplates/summary.html -> build/lib.macosx-10.9-x86_64-3.8/twisted/python/_pydoctortemplates
    copying src/twisted/words/xish/xpathparser.g -> build/lib.macosx-10.9-x86_64-3.8/twisted/words/xish
    copying src/twisted/words/im/instancemessenger.glade -> build/lib.macosx-10.9-x86_64-3.8/twisted/words/im
    copying src/twisted/python/test/_deprecatetests.py.3only -> build/lib.macosx-10.9-x86_64-3.8/twisted/python/test
    copying src/twisted/mail/test/rfc822.message -> build/lib.macosx-10.9-x86_64-3.8/twisted/mail/test
    copying src/twisted/trial/test/_assertiontests.py.3only -> build/lib.macosx-10.9-x86_64-3.8/twisted/trial/test
    copying src/twisted/internet/iocpreactor/notes.txt -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/iocpreactor
    copying src/twisted/internet/test/_awaittests.py.3only -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test
    copying src/twisted/internet/test/_yieldfromtests.py.3only -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test
    creating build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/chain.pem -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/not-a-certificate -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/thing1.pem -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/thing2-duplicate.pem -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test/fake_CAs
    copying src/twisted/internet/test/fake_CAs/thing2.pem -> build/lib.macosx-10.9-x86_64-3.8/twisted/internet/test/fake_CAs
    running build_ext
    building 'twisted.test.raiser' extension
    creating build/temp.macosx-10.9-x86_64-3.8
    creating build/temp.macosx-10.9-x86_64-3.8/src
    creating build/temp.macosx-10.9-x86_64-3.8/src/twisted
    creating build/temp.macosx-10.9-x86_64-3.8/src/twisted/test
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/twisted/test/raiser.c -o build/temp.macosx-10.9-x86_64-3.8/src/twisted/test/raiser.o
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/18/2kjpj9h55cbb179bxm6mrgwr0000gn/T/pip-install-3bd0hn62/twisted/setup.py'"'"'; __file__='"'"'/private/var/folders/18/2kjpj9h55cbb179bxm6mrgwr0000gn/T/pip-install-3bd0hn62/twisted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/18/2kjpj9h55cbb179bxm6mrgwr0000gn/T/pip-record-klnqvqm2/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/twisted Check the logs for full command output.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-02-24 02:24:36

sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev

sudo apt-get安装python3 python3 3-dev

[1]https://docs.scrapy.org/en/latest/intro/install.html

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60354699

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档