错误10061:无法建立连接-目标计算机主动拒绝了该连接 [英] Error 10061: No connection could be made - target machine actively refused it

查看:117
本文介绍了错误10061:无法建立连接-目标计算机主动拒绝了该连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我试图弄清楚如何使Python3支持https.我正在尝试通过cygwin安装软件包:

Ok, I am attempting to figure out how to get Python3 to support https. Am attempting to install a package via cygwin:

$"$ @"点安装 https://software.ecmwf.int/wiki/download/attachments/23694554/ecmwf-api-client-python.tgz 我将错误归结为:

$ "$@" pip install https://software.ecmwf.int/wiki/download/attachments/23694554/ecmwf-api-client-python.tgz I get the error boils down to this:

print"Python套接字模块未使用SSL支持进行编译.正在中止..."^因此,我想检查Python是否符合https并使用以下代码:

print "Python socket module was not compiled with SSL support. Aborting..." ^ So, I wanted to check if Python was https compliant and used this code:

import socket

host = '127.0.0.1'
port = 80

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
  s.connect((host, port))
  s.shutdown(2)
  print("Success connecting to ")
  print(host," on port: ",str(port))
except socket.error as e:
  print("Cannot connect to ")
  print(host," on port: ",str(port))
  print(e)

但是我最终遇到了错误:

But I end up with the error:

Cannot connect to 127.0.0.1  on port:  80
[WinError 10061] No connection could be made because the target machine actively refused it

我想做的所有事情(请尽量简化,因为我不是程序员,只是暂时使用python来访问某些数据的人),所以python不会给我这个错误,所以我可以要安装的软件包.

All I want to do (as simplistic as possible please as I'm not a programmer, just someone who is using python temporarily to access some data) is make it so python doesn't give me this error so I can get the package to install.

任何帮助将不胜感激.

Python 3.3.2 Windows XP

Python 3.3.2 Windows XP

推荐答案

我想端口80上没有侦听器".(对于检查HTTPS连接,应该是端口443,对吧?)

I guess there is no 'listener' on port 80. (And for checking HTTPS connections, it should be port 443, right?)

您需要启动一个侦听端口80的Web服务器.对于Windows,请使用XAMPP或WAMP服务器,只需单击一下按钮即可在端口80上启动服务器.对于Linux,建议使用Apache.

You need to start a web-server listening on the port 80. For Windows, use XAMPP or WAMP server, which needs just one click of button to start the server on port 80. For Linux, I suggest Apache.

这篇关于错误10061:无法建立连接-目标计算机主动拒绝了该连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆