python requirement.txt编译问题,代理问题为解决。

Date: 03/28/2024 11:00-12:00
Date: 03/27/2024 19:00-21:00

问题现象:开启代理后,无法正常下载

PS D:\workspace\winform\canvas\mysite依赖包>  python -m pip install flatlib-0.2.3-py3-none-any.whl
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/web/simple
Processing d:\workspace\winform\canvas\mysite依赖包\flatlib-0.2.3-py3-none-any.whl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request'))': /pypi/web/simple/pyswisseph/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request'))': /pypi/web/simple/pyswisseph/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request'))': /pypi/web/simple/pyswisseph/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request'))': /pypi/web/simple/pyswisseph/
ERROR: Operation cancelled by user

尝试直接访问网页地址

https://mirrors.ustc.edu.cn/pypi/web/simple
429 Too Many Requests
openresty
在这里插入图片描述

此时配置如下
pip.ini

[global]
index-url = https://pypi.python.org/simple/

问题未解决
1.尝试修改国内,国际源。都无法正常下载。依然出现刚开始的错误。

#国内源
https://mirrors.aliyun.com/pypi/simple
pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ pyswisseph
pip install --index-url https://mirrors.aliyun.com/pypi/simple pyswisseph
pip install --index-url https://pypi.mirrors.ustc.edu.cn/simple/ pyswisseph
pip install --index-url http://pypi.douban.com/simple/ pyswisseph

#国外源
[global]
index-url = https://pypi.org/simple/
#index-url = https://pypi.python.org/simple/

测试指令

尝试pip指定proxy,仍然报错

pip --proxy 主机号:端口号 install 下载的内容

pip --proxy 143.110.233.140:4780 install --index-url https://mirrors.aliyun.com/pypi/simple pyswisseph
pip --proxy 143.110.233.140:4780 install --index-url https://pypi.org/simple/ flatlib
pip --proxy 143.110.233.140:4780 install --index-url https://pypi.python.org/simple/ flatlib
pip install --index-url https://pypi.python.org/simple/ flatlib

错误信息

此时可以安装成功的原因是有cache,(这个执行结果是下载成功后重新复测的)

C:\Users\HASEE>pip --proxy 127.0.0.1:4780 install --index-url https://pypi.python.org/simple/ pandas
Looking in indexes: https://pypi.python.org/simple/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1074: The handshake operation timed out'))': /simple/pandas/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))': /simple/pandas/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1074: The handshake operation timed out'))': /simple/pandas/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))': /simple/pandas/
Collecting pandas
  Using cached pandas-1.3.5-cp37-cp37m-win_amd64.whl.metadata (12 kB)
Requirement already satisfied: python-dateutil>=2.7.3 in d:\webjava\python37\lib\site-packages (from pandas) (2.9.0.post0)
Requirement already satisfied: pytz>=2017.3 in c:\users\hasee\appdata\roaming\python\python37\site-packages (from pandas) (2021.1)
Requirement already satisfied: numpy>=1.17.3 in d:\webjava\python37\lib\site-packages (from pandas) (1.21.6)
Requirement already satisfied: six>=1.5 in d:\webjava\python37\lib\site-packages (from python-dateutil>=2.7.3->pandas) (1.16.0)
Using cached pandas-1.3.5-cp37-cp37m-win_amd64.whl (10.0 MB)
Installing collected packages: pandas
Successfully installed pandas-1.3.5

尝试过无用的解决失败的解决方法
1.IE代理设置
在这里插入图片描述
在这里插入图片描述

2.win10代理设置
在这里插入图片描述

方法一

关键文件

修改后立即生效,无需重新cmd(windows10)

C:\Users\HASEE\AppData\Roaming\pip
pip.ini

[global]
index-url = https://pypi.python.org/simple/
proxy = http://127.0.0.1:4780
trusted-host = pypi.org

最终结果:

下载速度突破1MB限制

开启proxy程序选择节点即可

在这里插入图片描述

方法二

此配置需要如下使用。

[global]
proxy = http://mirrors.aliyun.com/pypi/simple/
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
pip --proxy 127.0.0.1:4780 install --index-url https://mirrors.aliyun.com/pypi/simple pyswisseph
pip --proxy 127.0.0.1:4780 install --index-url https://pypi.org/simple/ flatlib
pip --proxy 127.0.0.1:4780 install --index-url https://pypi.python.org/simple/ flatlib

安装flatlib->pyswisseph报错

Processing d:\workspace\winform\canvas\mysite依赖包\pyswisseph-2.10.2.0-cp37-cp37m-win_amd64.whl
Installing collected packages: pyswisseph
Successfully installed pyswisseph-2.10.2.0
Collecting flatlib
  Using cached flatlib-0.2.3-py3-none-any.whl.metadata (733 bytes)
Collecting pyswisseph==2.08.00-1 (from flatlib)
  Using cached pyswisseph-2.08.00-1.tar.gz (521 kB)
  Preparing metadata (setup.py) ... done
Using cached flatlib-0.2.3-py3-none-any.whl (5.8 MB)
Building wheels for collected packages: pyswisseph
  Building wheel for pyswisseph (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Searching system libswe...
      pkg-config not found
      Using internal libswe
      d:\workspace\winform\canvas\mysitethinktanker20231219\venv_379\lib\site-packages\setuptools\dist.py:510: InformationOnly: Normalizing '2.08.00-1' to '2.8.0.post1'
        self._validate_version(self.metadata.version)
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyswisseph
  Running setup.py clean for pyswisseph
Failed to build pyswisseph
ERROR: Could not build wheels for pyswisseph, which is required to install pyproject.toml-based projects

解决办法

https://download.visualstudio.microsoft.com/download/pr/1afa33fc-e800-4714-9e19-31b928ea2572/1fc592e65b7c697cb80f96ae2c2f7ac9e6b366fecd42d7ecb451cc9f0de89624/vs_BuildTools.exe

下载"vs_BuildTools.exe"进行安装
在这里插入图片描述

备注:
—中途遇到某个依赖无法下载成功,可以使用此指令单独下载
pip install --index-url https://pypi.python.org/simple/ flatlib
–此行代码proxy没有生效。
pip --proxy 127.0.0.1:4780 install --index-url https://pypi.python.org/simple/ flatlib

错误信息:

  Building wheel for jieba (setup.py) ... done
  Created wheel for jieba: filename=jieba-0.39-py3-none-any.whl size=7282595 sha256=5348a5268931db1eabd31767cca2d65aa20a210e1e0af66b8dff7e492913a9aa
  Stored in directory: c:\users\hasee\appdata\local\pip\cache\wheels\0b\bd\b6\98ff4794102a7aadfc99837584f5572698209446c907579a5f
  Building wheel for jupyter-latex-envs (setup.py) ... done
  Created wheel for jupyter-latex-envs: filename=jupyter_latex_envs-1.4.6-py2.py3-none-any.whl size=963430 sha256=d5f0e4c5853c75dd54bb0b9dba58b7b0b59c56dd7dda1006e750c08b3c7259f1
  Stored in directory: c:\users\hasee\appdata\local\pip\cache\wheels\94\e6\66\7edabb346d0ce22826c461c0bc8d6b48386ecf06ff43c7cdb6
  Building wheel for mysqlclient (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-37
      creating build\lib.win-amd64-cpython-37\MySQLdb
      copying MySQLdb\__init__.py -> build\lib.win-amd64-cpython-37\MySQLdb
      copying MySQLdb\_exceptions.py -> build\lib.win-amd64-cpython-37\MySQLdb
      copying MySQLdb\connections.py -> build\lib.win-amd64-cpython-37\MySQLdb
      copying MySQLdb\converters.py -> build\lib.win-amd64-cpython-37\MySQLdb
      copying MySQLdb\cursors.py -> build\lib.win-amd64-cpython-37\MySQLdb
      copying MySQLdb\release.py -> build\lib.win-amd64-cpython-37\MySQLdb
      copying MySQLdb\times.py -> build\lib.win-amd64-cpython-37\MySQLdb
      creating build\lib.win-amd64-cpython-37\MySQLdb\constants
      copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-cpython-37\MySQLdb\constants
      copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-cpython-37\MySQLdb\constants
      copying MySQLdb\constants\CR.py -> build\lib.win-amd64-cpython-37\MySQLdb\constants
      copying MySQLdb\constants\ER.py -> build\lib.win-amd64-cpython-37\MySQLdb\constants
      copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-cpython-37\MySQLdb\constants
      copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-cpython-37\MySQLdb\constants
      running build_ext
      building 'MySQLdb._mysql' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
  Building wheel for notifications (setup.py) ... done
  Created wheel for notifications: filename=notifications-0.3.2-py3-none-any.whl size=4903 sha256=02bf59262592bce7f40c6c5ef72ac9aa33b5d48f99cd12e6ae23f61e614dec38
  Stored in directory: c:\users\hasee\appdata\local\pip\cache\wheels\39\1c\2e\27d93ea6d3e8b730ab0776cd669581076dd9fa9d47ab20b653
  Building wheel for pdfplumber (setup.py) ... done
  Created wheel for pdfplumber: filename=pdfplumber-0.5.26-py3-none-any.whl size=31786 sha256=464625e9ed8ef297281e3ea6ffd54db97a19c89949fe07d4215c509fe56b0b3e
  Stored in directory: c:\users\hasee\appdata\local\pip\cache\wheels\5f\bd\d7\a21d215eed5d598f591f6f372abb3c045bd8a24c16758068f4
  Building wheel for periodictable (setup.py) ... done
  Created wheel for periodictable: filename=periodictable-1.6.0-py3-none-any.whl size=749775 sha256=c4cfcce057ad95810797dee24188ba1e06b5120b97536460264178dcf52316d4
  Stored in directory: c:\users\hasee\appdata\local\pip\cache\wheels\2b\9e\f9\5ddb56d9009c8ec80024c037b12c8a6c38d7934bfc70c5ec0a
  Building wheel for python-docx (setup.py) ... done
  Created wheel for python-docx: filename=python_docx-0.8.11-py3-none-any.whl size=184516 sha256=eb6aec586c09107eea35cd221ce2b41f28ed9ea6d500018b57c8791a7d034198
  Stored in directory: c:\users\hasee\appdata\local\pip\cache\wheels\e5\a7\41\a9a4196d51aa2d7fc303c68557e1fe0842c4df7a8160c7efc6
Successfully built jieba jupyter-latex-envs notifications pdfplumber periodictable python-docx
Failed to build mysqlclient
ERROR: Could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects

中间遇到flatlib,pyswisseph,mysqlclient安装失败,可以单独安装好后再注释掉
requirements.txt

fastjsonschema==2.16.1
fire==0.4.0
#flatlib==0.2.3
flower==1.0.0
fonttools==4.28.0
pyrsistent==0.18.1
#pyswisseph==2.8.0.post1
python-crontab==2.6.0
matplotlib==3.5.1
matplotlib-inline==0.1.3
mistune==0.8.4
msgpack==1.0.3
#mysqlclient==2.1.1
nbclient==0.6.6
nbconvert==6.5.2

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/499651.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

WHM面板备份与恢复方法

上周有一个Hostease客户,购买了WHM面板的服务器,联系我们关于WHM面板中备份如何设置。接下来,我们分享如何在WHM面板中进行备份设置。 以下是在 WHM 面板中进行备份和恢复的基本步骤: 备份配置: 登录 WHM 控制面板&…

《 Arm Compiler 5.06 》__ARM编译器官网下载、安装和使用说明(小白也能懂)

目录 一、前言 二、官方网站下载 三、我的资源 四、编译器安装在 Keil 软件上 五、Keil选择编译器V5 “ V5.06 update 7(build 960) ” 六、测试 (* ̄︶ ̄)创作不易!期待你们的 点赞、收藏和评论喔。 一、前言 【Keil MDK-Arm5.37】不再…

Linux课程____selinux模式

一、是什么 它叫做“安全增强型 Linux(Security-Enhanced Linux)”,简称 SELinux,它是 Linux 的一个安全子系统 二、有啥用 就是最大限度地减小系统中服务进程可访问的资源(根据的是最小权限原则)。避免…

三个对象组练习.java

题目:定义数组存储3部汽车对象;汽车属性:品牌,价格,颜色;创造3个汽车对象,数据通过键盘录入而来,并把数据存储到数组当中 分析: 在main()里面定义…

QT----基于QT的人脸考勤系统ubuntu系统运行,编译到rk3588开发板运行

目录 1 Ubantu编译opencv和seetaface库1.1 Ubantu编译opencv1.2 Ubuntu编译seetaface1.3 安装qt 2 更改代码2.1 直接运行报错/usr/bin/ld: cannot find -lGL: No such file or directory2.2 遇到报错摄像头打不开2.3 修改部分代码2.4 解决中文语音输出问题 3 尝试交叉编译rk358…

产品经理如何提高产品业务逻辑?4个重点

产品经理培养良好的产品业务逻辑能力,能够更准确地理解和挖掘用户需求,梳理出详实且符合实际业务场景的产品需求文档,从而确保项目开发的方向正确、目标明确。而清晰的产品业务逻辑有助于减少项目执行中的反复沟通和需求确认,有助…

《数据结构学习笔记---第七篇》---栈和队列的OJ练习

1. 括号匹配问题。OJ链接 step1:思路分析 : 1.括号匹配,我们首先考虑用栈实现,我们通过符号栈帧的思想知道,求前中后缀表达式的时候用的就是栈帧,操作数栈和符号栈。 2.根据常见的情况 考虑怎么使用栈,首先…

【产品经理】华为IPD需求管理全思路分享!

作为一名产品经理,会在日常工作中接收到各种需求,而解决需求要提供对应的解决方案。本篇文章以华为的IPD需求管理流程为例,探讨其需求管理思路,帮助产品岗位的你快速做好需求管理并解决方案。 一、理清什么是产品需求 说到这个话…

AcWing 528. 奶酪(每日一题)

目录 题目: DFS(BFS): 并查集: 总结: 原题链接:528. 奶酪 - AcWing题库 题目: 现有一块大奶酪,它的高度为 h,它的长度和宽度我们可以认为是无限大的&am…

【C语言】内存函数(memmove)的使用和模拟实现

目录 前言memmove定义1.在cplusplus中的定义 memmove的模拟实现1、思路2、难点3、解决方法 模拟实现代码 前言 这篇文章讲述了memcpy的使用、模拟实现和一个未解决的问题内存函数(memcpy)的使用和模拟实现 当我们使用我们模拟的my_memcpy拷贝,当源拷贝地址与目标拷…

基于Axios封装请求---防止接口重复请求解决方案

一、引言 前端接口防止重复请求的实现方案主要基于以下几个原因: 用户体验:重复发送请求可能导致页面长时间无响应或加载缓慢,从而影响用户的体验。特别是在网络不稳定或请求处理时间较长的情况下,这个问题尤为突出。 服务器压力…

Intel Arc显卡安装Stable Diffusion

StableDiffusion是一种基于深度学习的文本到图像生成模型,于2022年发布。它主要用于根据文本描述生成详细图像,也可应用于其他任务,如内补绘制、外补绘制和在提示词指导下生成图像翻译。通过给定文本提示词,该模型会输出一张匹配提…

C语言编译与链接

前言 我们想一个问题,我们写的C语言代码都是文本信息,电脑能直接执行c语言代码吗?肯定不能啊,计算机能执行的是二进制指令,所以将C语言转化为二进制指令需要一段过程,这篇博客讲一下编译与链接,…

Go打造REST Server【二】:用路由的三方库来实现

前言 在之前的文章中,我们用Go的标准库来实现了服务器,JSON渲染重构为辅助函数,使特定的路由处理程序相当简洁。 我们剩下的问题是路径路由逻辑,这是所有编写无依赖HTTP服务器的人都会遇到的问题,除非服务器只处理一到…

【计算机网络篇】数据链路层(4.2)可靠传输的实现机制

文章目录 🍔可靠传输的实现机制⭐停止 - 等待协议🗒️注意 🔎停止 - 等待协议的信道利用率🗃️练习题 ⭐回退N帧协议🎈回退N帧协议的基本工作流程🔎无传输差错的情况🔎超时重传的情况&#x1f5…

Nomad Web更新没有最快只有更快

大家好,才是真的好。 很长时间没介绍运行在浏览器中的Notes客户端即Nomad Web更新情况。 不用安装,直接使用,还可以完美地兼容适应各种操作系统,Nomad Web一定是Notes/Domino产品现在和将来重点发展的用户访问模式。 不过&…

wsl kali在无缝模式下显示kali桌面的问题

Seamless mode shows the kali desktop 无缝模式下,同时显示kali的Panel和桌面 In Settings -> Session and Startup -> Current Session Change the “Restart Style” for the xfdesktop entry to “Never” Restart Win-KeX 高阶玩法 在Windows Te…

【MATLAB源码-第172期】基于matlab的小波变换能量率BP神经网络的机械轴承故障分析以及识别,附带程序说明。

操作环境: MATLAB 2022a 1、算法描述 在现代工业生产中,轴承是最为常见和关键的机械基础部件之一,其性能状态直接影响着整个机械系统的稳定性和可靠性。由于轴承在运行过程中不断承受高负荷和摩擦,故障发生的概率相对较高。轴承…

ICLR2024:南洋理工发布!改几个参数就为大模型注入后门

随着大语言模型(LLMs)在处理自然语言处理(NLP)相关任务中的广泛应用,它们在人们日常生活中的作用日益凸显。例如,ChatGPT等模型已被用于各种文本生成、分类和情感分析任务。然而,这些模型潜在的…

HarmonyOS实战开发-如何实现一个支持加减乘除混合运算的计算器。

介绍 本篇Codelab基于基础组件、容器组件,实现一个支持加减乘除混合运算的计算器。 说明: 由于数字都是双精度浮点数,在计算机中是二进制存储数据的,因此小数和非安全整数(超过整数的安全范围[-Math.pow(2, 53)&#…
最新文章