鱼C论坛

 找回密码
 立即注册
12
返回列表 发新帖
楼主: haitianodd

[已解决]安装Scrapy中报错

[复制链接]
 楼主| 发表于 2022-9-19 11:03:50 | 显示全部楼层
新版的非常方便,都可以直接用pip,谢谢大家
C:\Users\17447>python --version
Python 3.10.7

C:\Users\17447>pip

Usage:
  pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  inspect                     Inspect the python environment.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  cache                       Inspect and manage pip's wheel cache.
  index                       Inspect information available from package indexes.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --debug                     Let unhandled exceptions propagate outside the main subroutine, instead of logging them
                              to stderr.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  --require-virtualenv        Allow pip to only run in a virtual environment; exit with an error otherwise.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to
                              WARNING, ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --no-input                  Disable prompting for input.
  --proxy <proxy>             Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
                              (a)bort.
  --trusted-host <hostname>   Mark this host or host:port pair as trusted, even though it does not have valid or any
                              HTTPS.
  --cert <path>               Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL
                              Certificate Verification' in pip documentation for more information.
  --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the
                              certificate in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for
                              download. Implied with --no-index.
  --no-color                  Suppress colored output.
  --no-python-version-warning
                              Silence deprecation warnings for upcoming unsupported Pythons.
  --use-feature <feature>     Enable new functionality, that may be backward incompatible.
  --use-deprecated <feature>  Enable deprecated functionality, that will be removed in the future.

C:\Users\17447>pip --version
pip 22.2.2 from C:\Python31\lib\site-packages\pip (python 3.10)

C:\Users\17447>pip list
Package    Version
---------- -------
pip        22.2.2
setuptools 63.2.0

C:\Users\17447>pip install pywin32
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000186E3D37250>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pywin32/
Collecting pywin32
  Downloading pywin32-304-cp310-cp310-win_amd64.whl (12.1 MB)
     ---------------------------------------- 12.1/12.1 MB 30.4 kB/s eta 0:00:00
Installing collected packages: pywin32
Successfully installed pywin32-304

C:\Users\17447>pip list
Package    Version
---------- -------
pip        22.2.2
pywin32    304
setuptools 63.2.0

C:\Users\17447>pip install lxml
Collecting lxml
  Downloading lxml-4.9.1-cp310-cp310-win_amd64.whl (3.6 MB)
     ---------------------------------------- 3.6/3.6 MB 32.1 kB/s eta 0:00:00
Installing collected packages: lxml
Successfully installed lxml-4.9.1

C:\Users\17447>pip list
Package    Version
---------- -------
lxml       4.9.1
pip        22.2.2
pywin32    304
setuptools 63.2.0

C:\Users\17447>pip install pyOpenSSL
Collecting pyOpenSSL
  Downloading pyOpenSSL-22.0.0-py2.py3-none-any.whl (55 kB)
     ---------------------------------------- 55.8/55.8 kB 72.9 kB/s eta 0:00:00
Collecting cryptography>=35.0
  Downloading cryptography-38.0.1-cp36-abi3-win_amd64.whl (2.4 MB)
     ---------------------------------------- 2.4/2.4 MB 17.9 kB/s eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp310-cp310-win_amd64.whl (179 kB)
     ---------------------------------------- 179.1/179.1 kB 24.1 kB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ---------------------------------------- 118.7/118.7 kB 13.7 kB/s eta 0:00:00
Installing collected packages: pycparser, cffi, cryptography, pyOpenSSL
Successfully installed cffi-1.15.1 cryptography-38.0.1 pyOpenSSL-22.0.0 pycparser-2.21

C:\Users\17447>pip list
Package      Version
------------ -------
cffi         1.15.1
cryptography 38.0.1
lxml         4.9.1
pip          22.2.2
pycparser    2.21
pyOpenSSL    22.0.0
pywin32      304
setuptools   63.2.0

C:\Users\17447>pip install Scrapy
Collecting Scrapy
  Downloading Scrapy-2.6.2-py2.py3-none-any.whl (264 kB)
     ---------------------------------------- 264.5/264.5 kB 97.5 kB/s eta 0:00:00
Collecting protego>=0.1.15
  Downloading Protego-0.2.1-py2.py3-none-any.whl (8.2 kB)
Collecting itemadapter>=0.1.0
  Downloading itemadapter-0.7.0-py3-none-any.whl (10 kB)
Requirement already satisfied: cryptography>=2.0 in c:\python31\lib\site-packages (from Scrapy) (38.0.1)
Collecting zope.interface>=4.1.3
  Downloading zope.interface-5.4.0.tar.gz (249 kB)
     ---------------------------------------- 249.3/249.3 kB 28.8 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting tldextract
  Downloading tldextract-3.3.1-py3-none-any.whl (93 kB)
     ---------------------------------------- 93.6/93.6 kB 20.6 kB/s eta 0:00:00
Requirement already satisfied: lxml>=3.5.0 in c:\python31\lib\site-packages (from Scrapy) (4.9.1)
Collecting queuelib>=1.4.2
  Downloading queuelib-1.6.2-py2.py3-none-any.whl (13 kB)
Collecting parsel>=1.5.0
  Downloading parsel-1.6.0-py2.py3-none-any.whl (13 kB)
Collecting w3lib>=1.17.0
  Downloading w3lib-2.0.1-py3-none-any.whl (20 kB)
Collecting cssselect>=0.9.1
  Downloading cssselect-1.1.0-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: pyOpenSSL>=16.2.0 in c:\python31\lib\site-packages (from Scrapy) (22.0.0)
Collecting Twisted>=17.9.0
  Downloading Twisted-22.8.0-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 35.5 kB/s eta 0:00:00
Requirement already satisfied: setuptools in c:\python31\lib\site-packages (from Scrapy) (63.2.0)
Collecting PyDispatcher>=2.0.5
  Downloading PyDispatcher-2.0.6.tar.gz (38 kB)
  Preparing metadata (setup.py) ... done
Collecting service-identity>=16.0.0
  Downloading service_identity-21.1.0-py2.py3-none-any.whl (12 kB)
Collecting itemloaders>=1.0.1
  Downloading itemloaders-1.0.6-py3-none-any.whl (11 kB)
Requirement already satisfied: cffi>=1.12 in c:\python31\lib\site-packages (from cryptography>=2.0->Scrapy) (1.15.1)
Collecting jmespath>=0.9.5
  Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)
Collecting six>=1.6.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyasn1
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
     ---------------------------------------- 77.1/77.1 kB 20.9 kB/s eta 0:00:00
Collecting pyasn1-modules
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
     ---------------------------------------- 155.3/155.3 kB 33.6 kB/s eta 0:00:00
Collecting attrs>=19.1.0
  Downloading attrs-22.1.0-py2.py3-none-any.whl (58 kB)
     ---------------------------------------- 58.8/58.8 kB 30.2 kB/s eta 0:00:00
Collecting incremental>=21.3.0
  Downloading incremental-21.3.0-py2.py3-none-any.whl (15 kB)
Collecting constantly>=15.1
  Downloading constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting hyperlink>=17.1.1
  Downloading hyperlink-21.0.0-py2.py3-none-any.whl (74 kB)
     ---------------------------------------- 74.6/74.6 kB 30.1 kB/s eta 0:00:00
Collecting typing-extensions>=3.6.5
  Downloading typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Collecting Automat>=0.8.0
  Downloading Automat-20.2.0-py2.py3-none-any.whl (31 kB)
Collecting twisted-iocpsupport<2,>=1.0.2
  Downloading twisted_iocpsupport-1.0.2-cp310-cp310-win_amd64.whl (45 kB)
     ---------------------------------------- 45.7/45.7 kB 38.4 kB/s eta 0:00:00
Collecting idna
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ---------------------------------------- 61.5/61.5 kB 37.7 kB/s eta 0:00:00
Collecting requests-file>=1.4
  Downloading requests_file-1.5.1-py2.py3-none-any.whl (3.7 kB)
Collecting requests>=2.1.0
  Downloading requests-2.28.1-py3-none-any.whl (62 kB)
     ---------------------------------------- 62.8/62.8 kB 34.0 kB/s eta 0:00:00
Collecting filelock>=3.0.8
  Downloading filelock-3.8.0-py3-none-any.whl (10 kB)
Requirement already satisfied: pycparser in c:\python31\lib\site-packages (from cffi>=1.12->cryptography>=2.0->Scrapy) (2.21)
Collecting charset-normalizer<3,>=2
  Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
     ---------------------------------------- 140.4/140.4 kB 43.4 kB/s eta 0:00:00
Collecting certifi>=2017.4.17
  Downloading certifi-2022.9.14-py3-none-any.whl (162 kB)
     ---------------------------------------- 162.5/162.5 kB 21.3 kB/s eta 0:00:00
Using legacy 'setup.py install' for PyDispatcher, since package 'wheel' is not installed.
Using legacy 'setup.py install' for zope.interface, since package 'wheel' is not installed.
Installing collected packages: twisted-iocpsupport, PyDispatcher, pyasn1, incremental, constantly, zope.interface, w3lib, urllib3, typing-extensions, six, queuelib, pyasn1-modules, jmespath, itemadapter, idna, filelock, cssselect, charset-normalizer, certifi, attrs, requests, protego, parsel, hyperlink, Automat, Twisted, service-identity, requests-file, itemloaders, tldextract, Scrapy
  Running setup.py install for PyDispatcher ... done
  Running setup.py install for zope.interface ... done
Successfully installed Automat-20.2.0 PyDispatcher-2.0.6 Scrapy-2.6.2 Twisted-22.8.0 attrs-22.1.0 certifi-2022.9.14 charset-normalizer-2.1.1 constantly-15.1.0 cssselect-1.1.0 filelock-3.8.0 hyperlink-21.0.0 idna-3.4 incremental-21.3.0 itemadapter-0.7.0 itemloaders-1.0.6 jmespath-1.0.1 parsel-1.6.0 protego-0.2.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 queuelib-1.6.2 requests-2.28.1 requests-file-1.5.1 service-identity-21.1.0 six-1.16.0 tldextract-3.3.1 twisted-iocpsupport-1.0.2 typing-extensions-4.3.0 urllib3-1.26.12 w3lib-2.0.1 zope.interface-5.4.0

C:\Users\17447>scrapy
Scrapy 2.6.2 - no active project

Usage:
  scrapy <command> [options] [args]

Available commands:
  bench         Run quick benchmark test
  commands
  fetch         Fetch a URL using the Scrapy downloader
  genspider     Generate new spider using pre-defined templates
  runspider     Run a self-contained spider (without creating a project)
  settings      Get settings values
  shell         Interactive scraping console
  startproject  Create new project
  version       Print Scrapy version
  view          Open URL in browser, as seen by Scrapy

  [ more ]      More commands available when run from project directory

Use "scrapy <command> -h" to see more info about a command
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-9-19 18:57:37 | 显示全部楼层
haitianodd 发表于 2022-9-19 09:24
目录和注册表 里面有的文件我都删除了,还是一样的错误,我装个新版好了,不折腾了,辛苦你大神

卸载Python需要使用安装包文件,选择Uninstall,然后才能正确卸载。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-9-19 18:58:26 | 显示全部楼层
haitianodd 发表于 2022-9-19 09:24
目录和注册表 里面有的文件我都删除了,还是一样的错误,我装个新版好了,不折腾了,辛苦你大神

没关系哈~我喜欢帮忙(我是语文课代表)
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-22 21:32

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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