我是用Python编写的程序的用户,对Python的开发方面知之甚少。我遇到的问题是,在Windows下,我偶尔会遇到这个错误:
INFO - [Mar 03 09:00:41] GAE "GET https://inbox.google.com/" appid='someappid' SSLError('The read operation timed out',), retry...
----------------------------------------
Exception happened during processing of request from ('10.1.21.66', 51549)
Traceback (most recent call last):
File "C:\goagent-3.2.3\local\python27.zip\SocketServer.py", line 595, in process_request_thread
File "C:\goagent-3.2.3\local\proxylib.py", line 934, in finish_request
File "proxy.py", line 761, in __init__
File "C:\goagent-3.2.3\local\python27.zip\SocketServer.py", line 651, in __init__
File "C:\goagent-3.2.3\local\python27.zip\BaseHTTPServer.py", line 340, in handle
File "C:\goagent-3.2.3\local\proxylib.py", line 2296, in handle_one_request
File "C:\goagent-3.2.3\local\python27.zip\BaseHTTPServer.py", line 328, in handle_one_request
File "C:\goagent-3.2.3\local\proxylib.py", line 2327, in do_METHOD
File "C:\goagent-3.2.3\local\proxylib.py", line 1031, in handle
File "C:\goagent-3.2.3\local\proxylib.py", line 2327, in do_METHOD
File "proxy.py", line 452, in handle
File "proxy.py", line 452, in <genexpr>
LookupError: unknown encoding: cp1252
我做了一些研究,似乎Python安装缺少libiconv。现在我正在使用的程序实际上是goagent(https://github.com/goagent/goagent)。该发行版包含python27.exe,python27.zip形式的Python 2.7和几个看似纯粹支持程序(代理)功能的.py文件 - addto-startup.py,dnsproxy.py,goagent-gtk.py, proxy.py,proxylib.py。我自己没有安装Python,并且python不能在命令行下直接执行。
如何使这个捆绑的Python加载libiconv?还请指出我在这个场景下载libiconv的正确位置。
答案 0 :(得分:0)
I do not have enough points to comment hence writing in ANSWER section
如果你想要libiconv,那么你可以按照安装方向here进行操作 它似乎是对mingw64编译器的依赖,它可能是您尝试下载的发行版的一部分。
另一种解决方案可能如下,
从here安装普通python 它将安装大多数所需的模块及其MSI安装程序,因此安装应该是无缝的。
从here安装python的pip
安装pip后,只需在命令提示符下或windows power shell上运行以下命令即可安装任何所需的模块
pip install <module_namer>
例如。
pip install pyaudio
其中pyaudio是一个必需的模块。