python 怎么查看一个正在安装中的包是被谁依赖了?

python 怎么查看一个正在安装中的包是被谁依赖了?

requirements-crawl.txt

# mysqlclient

Scrapy

python-dateutil

pika

cloudscraper

httpx

docker-compose

loguru

ddddocr

PySocks

streamlink

pymongo

aiohttp

playwright

redis

tls-client

captchatools

httpx

# cython<3.0.0

pip install -r requirements-crawl.txt

 > [12/17] RUN pip install -r requirements-crawl.txt:                                                                                                                          

0.937 Collecting mysqlclient (from -r requirements-crawl.txt (line 1))

1.028 Downloading mysqlclient-2.2.0.tar.gz (89 kB)

1.058 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 3.2 MB/s eta 0:00:00

1.081 Installing build dependencies: started

3.897 Installing build dependencies: finished with status 'done'

3.898 Getting requirements to build wheel: started

4.224 Getting requirements to build wheel: finished with status 'done'

4.228 Installing backend dependencies: started

6.136 Installing backend dependencies: finished with status 'done'

6.138 Preparing metadata (pyproject.toml): started

6.455 Preparing metadata (pyproject.toml): finished with status 'done'

6.459 Requirement already satisfied: Scrapy in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 2)) (2.10.1)

6.499 Collecting python-dateutil (from -r requirements-crawl.txt (line 3))

6.515 Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)

6.536 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 13.1 MB/s eta 0:00:00

6.580 Collecting pika (from -r requirements-crawl.txt (line 4))

6.595 Downloading pika-1.3.2-py3-none-any.whl (155 kB)

6.604 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.4/155.4 kB 24.0 MB/s eta 0:00:00

6.665 Collecting cloudscraper (from -r requirements-crawl.txt (line 5))

6.680 Downloading cloudscraper-1.2.71-py2.py3-none-any.whl (99 kB)

6.688 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.7/99.7 kB 16.5 MB/s eta 0:00:00

6.694 Requirement already satisfied: httpx in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 6)) (0.24.1)

6.777 Collecting docker-compose (from -r requirements-crawl.txt (line 7))

6.793 Downloading docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)

6.802 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.8/114.8 kB 19.5 MB/s eta 0:00:00

6.808 Requirement already satisfied: loguru in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 8)) (0.7.1)

6.839 Collecting ddddocr (from -r requirements-crawl.txt (line 9))

6.855 Downloading ddddocr-1.0.6-py3-none-any.whl (6.9 MB)

6.948 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.9/6.9 MB 76.3 MB/s eta 0:00:00

7.004 Collecting PySocks (from -r requirements-crawl.txt (line 10))

7.018 Downloading PySocks-1.7.1-py3-none-any.whl (16 kB)

7.098 Collecting streamlink (from -r requirements-crawl.txt (line 11))

7.098 Obtaining dependency information for streamlink from https://files.pythonhosted.org/packages/c4/78/a9d1996b76cc8dd359b46978aaddb11ff3ad956d288e39c633998fe2cf55/streamlink-6.1.0-py3-none-any.whl.metadata

7.113 Downloading streamlink-6.1.0-py3-none-any.whl.metadata (6.4 kB)

7.763 Collecting pymongo (from -r requirements-crawl.txt (line 12))

7.764 Obtaining dependency information for pymongo from https://files.pythonhosted.org/packages/77/c8/aa46a179d476a06630cf9a5463c5edc06b938fa8894b99194ebbdc775d76/pymongo-4.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata

7.779 Downloading pymongo-4.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (22 kB)

8.307 Collecting aiohttp (from -r requirements-crawl.txt (line 13))

8.308 Obtaining dependency information for aiohttp from https://files.pythonhosted.org/packages/4c/b8/5c5efbb1d3cb1da3612b8e309e8e31b602ee9c5cca8e41961db385fc9d00/aiohttp-3.8.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata

8.322 Downloading aiohttp-3.8.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.7 kB)

8.423 Collecting playwright (from -r requirements-crawl.txt (line 14))

8.424 Obtaining dependency information for playwright from https://files.pythonhosted.org/packages/a6/43/a7ff635b8be554345fa712b15e1ff60c073bb78474c797bd93c4a99aec5e/playwright-1.37.0-py3-none-manylinux1_x86_64.whl.metadata

8.439 Downloading playwright-1.37.0-py3-none-manylinux1_x86_64.whl.metadata (3.5 kB)

8.446 Requirement already satisfied: redis in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 15)) (5.0.0)

8.479 Collecting tls-client (from -r requirements-crawl.txt (line 16))

8.496 Downloading tls_client-0.2.1-py3-none-any.whl (35.2 MB)

8.912 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.2/35.2 MB 39.7 MB/s eta 0:00:00

9.063 Collecting captchatools (from -r requirements-crawl.txt (line 17))

9.064 Obtaining dependency information for captchatools from https://files.pythonhosted.org/packages/49/0a/3798c46491c022ebb137259cce2f62c42e0ff5f09bb096b945f90546cccd/captchatools-1.4.1-py3-none-any.whl.metadata

9.078 Downloading captchatools-1.4.1-py3-none-any.whl.metadata (10 kB)

9.677 Collecting cython<3.0.0 (from -r requirements-crawl.txt (line 19))

9.678 Obtaining dependency information for cython<3.0.0 from https://files.pythonhosted.org/packages/43/c9/4c8a84731c0948b408d059c2c17c95cbb8b9c2baefe1c6985c0b29a9055e/Cython-0.29.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.metadata

9.693 Downloading Cython-0.29.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.metadata (3.1 kB)

9.720 Requirement already satisfied: Twisted<23.8.0,>=18.9.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (22.10.0)

9.722 Requirement already satisfied: cryptography>=36.0.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (36.0.2)

9.724 Requirement already satisfied: cssselect>=0.9.1 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.2.0)

9.726 Requirement already satisfied: itemloaders>=1.0.1 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.1.0)

9.728 Requirement already satisfied: parsel>=1.5.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.8.1)

9.730 Requirement already satisfied: pyOpenSSL>=21.0.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (23.2.0)

9.732 Requirement already satisfied: queuelib>=1.4.2 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.6.2)

9.734 Requirement already satisfied: service-identity>=18.1.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (23.1.0)

9.736 Requirement already satisfied: w3lib>=1.17.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (2.1.2)

9.739 Requirement already satisfied: zope.interface>=5.1.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (6.0)

9.741 Requirement already satisfied: protego>=0.1.15 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (0.3.0)

9.744 Requirement already satisfied: itemadapter>=0.1.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (0.8.0)

9.745 Requirement already satisfied: setuptools in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (65.5.1)

9.747 Requirement already satisfied: packaging in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (23.1)

9.748 Requirement already satisfied: tldextract in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (3.5.0)

9.750 Requirement already satisfied: lxml>=4.4.1 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (4.9.3)

9.753 Requirement already satisfied: PyDispatcher>=2.0.5 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (2.0.7)

9.757 Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/site-packages (from python-dateutil->-r requirements-crawl.txt (line 3)) (1.16.0)

9.834 Collecting pyparsing>=2.4.7 (from cloudscraper->-r requirements-crawl.txt (line 5))

9.835 Obtaining dependency information for pyparsing>=2.4.7 from https://files.pythonhosted.org/packages/39/92/8486ede85fcc088f1b3dba4ce92dd29d126fd96b0008ea213167940a2475/pyparsing-3.1.1-py3-none-any.whl.metadata

9.849 Downloading pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)

9.856 Requirement already satisfied: requests>=2.9.2 in /usr/local/lib/python3.11/site-packages (from cloudscraper->-r requirements-crawl.txt (line 5)) (2.31.0)

9.890 Collecting requests-toolbelt>=0.9.1 (from cloudscraper->-r requirements-crawl.txt (line 5))

9.904 Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)

9.911 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 10.4 MB/s eta 0:00:00

9.928 Requirement already satisfied: certifi in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (2023.7.22)

9.931 Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (0.17.3)

9.932 Requirement already satisfied: idna in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (3.4)

9.934 Requirement already satisfied: sniffio in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (1.3.0)

10.05 Collecting PyYAML<6,>=3.10 (from docker-compose->-r requirements-crawl.txt (line 7))

10.07 Downloading PyYAML-5.4.1.tar.gz (175 kB)

10.08 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 27.1 MB/s eta 0:00:00

10.25 Installing build dependencies: started

14.79 Installing build dependencies: finished with status 'done'

14.80 Getting requirements to build wheel: started

15.07 Getting requirements to build wheel: finished with status 'error'

15.08 error: subprocess-exited-with-error

15.08

15.08 × Getting requirements to build wheel did not run successfully.

15.08 │ exit code: 1

15.08 ╰─> [68 lines of output]

15.08 /tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`

15.08 !!

15.08

15.08 ********************************************************************************

15.08 The license_file parameter is deprecated, use license_files instead.

15.08

15.08 By 2023-Oct-30, you need to update your project and remove deprecated calls

15.08 or your builds will no longer be supported.

15.08

15.08 See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.

15.08 ********************************************************************************

15.08

15.08 !!

15.08 parsed = self.parsers.get(option_name, lambda x: x)(value)

15.08 running egg_info

15.08 writing lib3/PyYAML.egg-info/PKG-INFO

15.08 writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt

15.08 writing top-level names to lib3/PyYAML.egg-info/top_level.txt

15.08 Traceback (most recent call last):

15.08 File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>

15.08 main()

15.08 File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main

15.08 json_out['return_val'] = hook(**hook_input['kwargs'])

15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

15.08 File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel

15.08 return hook(config_settings)

15.08 ^^^^^^^^^^^^^^^^^^^^^

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel

15.08 return self._get_build_requires(config_settings, requirements=['wheel'])

15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires

15.08 self.run_setup()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup

15.08 exec(code, locals())

15.08 File "<string>", line 271, in <module>

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup

15.08 return distutils.core.setup(**attrs)

15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup

15.08 return run_commands(dist)

15.08 ^^^^^^^^^^^^^^^^^^

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands

15.08 dist.run_commands()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands

15.08 self.run_command(cmd)

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1001, in run_command

15.08 super().run_command(command)

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command

15.08 cmd_obj.run()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 318, in run

15.08 self.find_sources()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 326, in find_sources

15.08 mm.run()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 548, in run

15.08 self.add_defaults()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 586, in add_defaults

15.08 sdist.add_defaults(self)

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 113, in add_defaults

15.08 super().add_defaults()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults

15.08 self._add_defaults_ext()

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext

15.08 self.filelist.extend(build_ext.get_source_files())

15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

15.08 File "<string>", line 201, in get_source_files

15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__

15.08 raise AttributeError(attr)

15.08 AttributeError: cython_sources

15.08 [end of output]

15.08

15.08 note: This error originates from a subprocess, and is likely not a problem with pip.

15.09 error: subprocess-exited-with-error

15.09

15.09 × Getting requirements to build wheel did not run successfully.

15.09 │ exit code: 1

15.09 ╰─> See above for output.

15.09

15.09 note: This error originates from a subprocess, and is likely not a problem with pip.

大概意思是,pyyaml <6 的,不支持 python3.11

https://pypi.org/project/PyYAML/#history

我想知道,是哪个包要求 pyyaml 版本低于 6.0?


回答:

Collecting PyYAML<6,>=3.10 (from docker-compose->-r requirements-crawl.txt (line 7))
这里写了是docker-compose的依赖

以上是 python 怎么查看一个正在安装中的包是被谁依赖了? 的全部内容, 来源链接: utcz.com/p/939010.html

回到顶部