PyPi使用说明

Pypi包管理 #

pypi

示例项目 #

py-muti-scrcpy

配置文件 #

pyproject

工具介绍 #

poetry

增加安装包 #

直接修改pyproject.toml文件并不能生效, 因为还依赖于poetry.lock

可使用poetry add {xxx}进行添加

注意事项 #

需要链接外网 #

HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/17/61/32c3ab8951142e061587d957226b5683d1387fb22d95b4f69186d92616d1/typing_extensions-4.0.0-py3-none-any.whl (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(54, 'Connection reset by peer')))

HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/colorama/0.4.4/json (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(54, 'Connection reset by peer')))

需要安装ssl #

SSLError

  HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/importlib-metadata/4.2.0/json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

该问题可通过安装openssl解决:

pip install ndg-httpsclient
pip install pyopenssl
pip install pyasn1

CI WorkFlows #

workflows

pypi token #