python_xiaojie 发表于 2020-3-19 21:17:18

scrap安装失败?

用pip安装scrapy失败
pip install scrapy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

报错如下:
pip install scrapy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: http://pypi.douban.com/simple/
Collecting scrapy
Downloading http://pypi.doubanio.com/packages/3b/e4/69b87d7827abf03dea2ea984230d50f347b00a7a3897bc93f6ec3dafa494/Scrapy-1.8.0-py2.py3-none-any.whl (238kB)
   |████████████████████████████████| 245kB 467kB/s
Collecting service-identity>=16.0.0 (from scrapy)
Downloading http://pypi.doubanio.com/packages/e9/7c/2195b890023e098f9618d43ebc337d83c8b38d414326685339eb024db2f6/service_identity-18.1.0-py2.py3-none-any.whl
Collecting parsel>=1.5.0 (from scrapy)
Downloading http://pypi.doubanio.com/packages/86/c8/fc5a2f9376066905dfcca334da2a25842aedfda142c0424722e7c497798b/parsel-1.5.2-py2.py3-none-any.whl
Collecting pyOpenSSL>=16.2.0 (from scrapy)
Downloading http://pypi.doubanio.com/packages/9e/de/f8342b68fa9e981d348039954657bdf681b2ab93de27443be51865ffa310/pyOpenSSL-19.1.0-py2.py3-none-any.whl (53kB)
   |████████████████████████████████| 61kB 974kB/s
Collecting queuelib>=1.4.2 (from scrapy)
Downloading http://pypi.doubanio.com/packages/4c/85/ae64e9145f39dd6d14f8af3fa809a270ef3729f3b90b3c0cf5aa242ab0d4/queuelib-1.5.0-py2.py3-none-any.whl
Collecting Twisted>=16.0.0; python_version == "2.7" (from scrapy)
Downloading http://pypi.doubanio.com/packages/0b/95/5fff90cd4093c79759d736e5f7c921c8eb7e5057a70d753cdb4e8e5895d7/Twisted-19.10.0.tar.bz2 (3.1MB)
   |████████████████████████████████| 3.1MB 1.2MB/s
    ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv = '"'"'/private/var/folders/qv/8ggjp2rn4t96xz9fcgt33tww0000gn/T/pip-install-TdnVIQ/Twisted/setup.py'"'"'; __file__='"'"'/private/var/folders/qv/8ggjp2rn4t96xz9fcgt33tww0000gn/T/pip-install-TdnVIQ/Twisted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /private/var/folders/qv/8ggjp2rn4t96xz9fcgt33tww0000gn/T/pip-install-TdnVIQ/Twisted/
    Complete output (12 lines):
    no previously-included directories found matching '.travis'
    no previously-included directories found matching 'tests'
    warning: no previously-included files found matching 'examplesetup.py'
    no previously-included directories found matching 'src/exampleproj'
    no previously-included directories found matching 'src/incremental/newsfragments'
   
    Installed /private/var/folders/qv/8ggjp2rn4t96xz9fcgt33tww0000gn/T/pip-install-TdnVIQ/Twisted/.eggs/incremental-17.5.0-py2.7.egg
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
      warnings.warn(msg)
    error in Twisted setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

python_xiaojie 发表于 2020-3-19 22:52:23

解决了,升级下pip和setuptools就可以了
页: [1]
查看完整版本: scrap安装失败?