无法安装扭曲的(以防刮擦)

问题描述 投票:0回答:1

标题中的所有内容我都试图安装scrapy,安装扭曲时出现此错误。我不知道该如何解决。我试图卸载我没有设法做到的Python(我认为)。因此,我下载了Python 3.8,然后重新安装/覆盖了它。已安装点子,但同样错误。一点帮助将不胜感激。 (我不得不删除大多数错误,这些错误是96000行复制内容)谢谢

~ pielov$ pip3 install twisted

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
 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.
python-3.x macos terminal scrapy twisted
1个回答
0
投票

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

sudo apt-get install python3 python3-dev

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

热门问题
推荐问题
最新问题