I have a Kubuntu 10.04 VM image and am trying to install ReviewBoard by following The Linux Installation Wiki. When I get to the step to easy_install ReviewBoard, I encounter a problem I cannot find a solution to. Below is the console output:
>> sudo easy_install ReviewBoard
Searching for ReviewBoard
Best match: ReviewBoard 1.0.8
Processing ReviewBoard-1.0.8-py2.6.egg
ReviewBoard 1.0.8 is already the active version in easy-install.pth
Installing rb-site script to /usr/local/bin
Using /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg
Processing dependencies for ReviewBoard
Searching for pytz
Reading http://downloads.reviewboard.org/mirror/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Reading http://downloads.reviewboard.org/releases/ReviewBoard/1.0/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Reading http://pypi.python.org/simple/pytz/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Reading http://pypi.python.org/simple/pytz/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Couldn't find index page for 'pytz' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
No local packages or download links found for pytz
error: Could not find suitable distribution for Requirement.parse('pytz')
I am new to python, but it seems like easy_install cannot decide on a version of pytz. I have read
104, 'Connection reset by peer' socket error, or When does closing a socket result in a RST rather than FIN?
http://homepage.mac.com/s_lott/iblog/architecture/C551260341/E20081031204203/index.html
and it seems like the problem described in those articles has more to do with development than my problem, but I could be wrong.
Has anyone encountered a problem like this? If there is any missing information that would help troubleshoot this, please let me know.
#Ben Hoffstein
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes: Not reported
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: No
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
EDIT:
I'm not sure if this will be more useful information, but I tried installing the gitplugin for Trac and I received the same issue. So, it's looking like it may be a problem with easy_install.
>> sudo easy_install http://trac-hacks.org/svn/gitplugin/0.11
Downloading http://trac-hacks.org/svn/gitplugin/0.11
error: Download error for http://trac-hacks.org/svn/gitplugin/0.11: [Errno 104] Connection reset by peer
This is possibly a temporary problem with PyPI host, try again: easy_install pytz
like #Tarantula said, it is a temporary pypi service problem, i hit the same yesterday. i tried to ping pypi.python.org (or dig or host) a few times and find there are 2 servers returned by dns server. and it is because one of the pypi server keep throwing this error for one of the python package request.
so i hard coded the mapping pypi.python.org to the good one in /etc/hosts basically force pypi.python.org to resolve to the server i wanted and it relieved my pain. of course it is a temporary workaround when we have no control of the external service.
# add a line to /etc/hosts
151.101.200.223 pypi.python.org
get rid of the line when the service get back to normal.
Related
I am trying to install Django 1.8.11 on my Windows 10 PC, but i am getting this error when run pip install django==1.8.11:
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001CE97C60D68>, 'Connection to xxxx.xxxx.xxx.xx timed out. (connect timeout=15)')': /simple/pip/
(xxxx.xxxx.xxx.xx Is an address that I use as proxy some times)
I have Python version: 3.5.4
and pip version: 9.0.1
I have checked proxy settings with netsh winhttp show proxy
Current WinHTTP proxy settings:
Direct access (no proxy server).
I am not behind any corporate proxy
My system proxy settings are
Automatically detect settings -> ON
Use setup script -> OFF
Use a proxy server -> OFF
Also tried ping pypi.python.org
Ping statistics for 151.101.4.223:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 92ms, Maximum = 102ms, Average = 95ms
So, I have access to the internet
Also i removed temp files, tried python -m pip --proxy="" install django==1.8.11, searched the registry for data or value xxxx.xxxx.xxx.xx, same result...
If anyone knows where is that xxxx.xxxx.xxx.xx configured so I can remove it, don't know what else to do.
Look into the current environment variables, try to find any proxy setting:
set | find "proxy"
If anything found — unset the variables.
List settings from the config file:
pip config list | find "proxy"
If anything found — unset the variable using pip config unset or pip config edit. See the docs for pip config at https://pip.pypa.io/en/stable/reference/pip_config/
Try installing the latest version pip install Django
https://pypi.org/project/Django/
I was not able to solve this for days, so if you can give me any advice I would appreciate it!
When I try to install any package from python I get this message (in this case lets take flask for example):
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/flask/
Could not find a version that satisfies the requirement Flask (from versions: )
No matching distribution found for Flask "
I do not really understand what caused it because previously everything worked well and I was able to install packages. And, I did not install anything new in between. Also, I am really a beginner in python programming and I do not fully understand what exactly the message is trying to say. I definitely have an internet connection and I have installed e.g. Flask previously and have used it as well. The only thing that happened before everything got stack was that my internet provider has "rebooted" my internet connection (I am not sure that "reboot" is the right termini for that).
I am using Windows subsystem for Linux, Visual studio code and python version: Python 3.6.8 (default, Oct 7 2019, 12:59:55) [GCC 8.3.0] on Linux.
This sounds like a DNS issue. Pip would be trying to resolve https://pypi.org. But ultimately that has to resolve to an IP Address.
Most ISPs provide a DNS service by default. Perhaps it wasn't able to resolve it?
When you added nameserver 8.8.8.8 you're using a Google DNS server which, it seems worked as expected by resolving https://pypi.org
I solved it by adding:
nameserver 8.8.8.8
nameserver 8.8.4.4
to the file:
/etc/resolv.conf
(via $sudo nano /etc/resolv.conf and save)
BUT I still do not understand fully why it worked? and Where came the problem from?
I am controlling a remote unit over SSH and OPENVPN.
On the remote unit I want to install some Python packages using pip but:
the remote company firewall allows only traffic on port 22 (and not 443, needed by pip);
DNS is not installed on the remote unit;
I cannot modify any OPENVPN settings (or I would like to avoid this option as it means to access some remote sysadmin and try to convince him that the configuration must be changed);
all systems are Linux (Ubuntu + Debian). Non Windows involved.
Stripping down hours of attempts (I am not a system admin and my knowledge on this subject is very limited), the idea was to open an obvious SSH port forwarding:
ssh -R 9999:pypi.python.org:443 xxxx#XX.XX.XX.XX
and then, on the remote unit play with pip install:
pip install pymodbus==1.3.2 --proxy localhost:9999
But this command returns:
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pymodbus==1.3.2
/root/.pip/pip.log is:
Getting page https://pypi.python.org/simple/pymodbus/
Could not fetch URL https://pypi.python.org/simple/pymodbus/: connection error: ('Connection aborted.', BadStatusLine("''",))
Will skip URL https://pypi.python.org/simple/pymodbus/ when looking for download links for pymodbus==1.3.2
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: connection error: ('Connection aborted.', BadStatusLine("''",))
Will skip URL https://pypi.python.org/simple/ when looking for download links for pymodbus==1.3.2
Cannot fetch index base URL https://pypi.python.org/simple/
URLs to search for versions for pymodbus==1.3.2:
* https://pypi.python.org/simple/pymodbus/1.3.2
* https://pypi.python.org/simple/pymodbus/
Getting page https://pypi.python.org/simple/pymodbus/1.3.2
Could not fetch URL https://pypi.python.org/simple/pymodbus/1.3.2: connection error: ('Connection aborted.', BadStatusLine("''",))
Will skip URL https://pypi.python.org/simple/pymodbus/1.3.2 when looking for download links for pymodbus==1.3.2
Getting page https://pypi.python.org/simple/pymodbus/
It is obvious the remote unit cannot read the index page on pypi.pthon.org because the connection is refused.
What is the correct syntax for what I am trying to achieve?
Proxy is going to be tricky. I suggest that you scp the pip module source file and install it locally from source. Use
pip install package —download="/pth/to/downloaded/file” to get the package, scp it to the dest server and use pip install “/pth/to/scp/file”
It's look like my problem. after exploration, I have found a solution.
And because in my region, pypi.python.org is slow, so I change my pip.conf and use pypi.douban.com/simple, as my index-url. this website use http protocol. so in my solution. I use 80 port as my target port.
Problem:
I have two host. host1 could connect Pypi.douban.com. and host2 couldn't.
but I can connect host2 in host1 through ssh.
so in host2, I open a tmux session and open a ssh tunnel by local port forwarding(not remote port forwarding):
ssh -L 9999:pypi.douban.com:80 username#host1
after this redirect, I can use
pip install scikit-learn --proxy localhost:9999
to install package in host2.
I'm using Windows 10 pro(x64) and I have just installed Anaonda 4.3.1
But whenever I try to install a package or update conda, it shows an error like the below.
(d:\Miniconda3) C:\Windows\system32>conda update conda
Fetching package metadata .....
CondaHTTPError: HTTP None None for url <None>
Elapsed: None
An HTTP error occurred when trying to retrieve this URL.
SSLError(SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert bad record mac')],)",),),)
conda config --set ssl_verify False doesn't make any difference either.
I have no problem installing packages using pip.
These errors coming from such abstracting (i.e. with a high level of abstraction) tools are usually really hard to debug from the tool themselves (it requires quite a lot of digging around in the tool's code to pinpoint and finally find the issue); to the extent that in the vast majority of cases, once you've debugged it, you know enough about the tool in question to actually be able to write a patch to solve that problem.
What I would recommend is to first trace how does conda get the metadata it is getting at first (first line of your output). On UNIX I would recommend tcpdump, but on windows I would use wireshark (albeit according to the wikipedia page for tcpdump, it works on windows too).
Once you know what host the package should be obtained from, you can try to understand why it occurs. Namely, the bad record mac error should not occur under normal conditions; i.e. either you have a network problem (try with another network) or there is a server (more likely if conda used to work) or client problem.
To try to debug the SSL issue once you know the host, run:
openssl s_client -connect $host:443 -msg -debug
Where $host is the host you found using tcpdump/wireshark.
Best of luck!
Note: I have not linked wireshark.org in this answer, but instead the wikipedia page for wireshark to prevent supporting bogus security practices 1,2. Please do not edit that link.
Have a weird problem here.
I am in a network that uses an authenticated proxy to connect to the outside world. I do not control this proxy server.
This fact has in the past tripped me up with use of wget, curl, etc. (this is on Mac OSX 10.8). So, I set the environment variables:
HTTP_PROXY=proxyserveraddress:3128
FTP_PROXY=proxyserveraddress:3128
RSYNC_PROXY=proxyserveraddress:3128
This when added to the bash rc (is it profile?) file, has made the network connections transparent to the shell. There is also a system proxy setting that points the same way.
Now, I installed Plone and wanted to plone.app.ldap egg to the installation.
I ran bin/buildout after updating buildout.cfg (to include this egg), and I get:
Installing instance.
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection refused -- Some packages may not be found!
Couldn't find index page for 'plone.app.ldap' (maybe misspelled?)
Download error on http://pypi.python.org/simple/: [Errno 61] Connection refused -- Some packages may not be found!
Getting distribution for 'plone.app.ldap'.
While:
Installing instance.
Getting distribution for 'plone.app.ldap'.
Error: Couldn't find a distribution for 'plone.app.ldap'.
*************** PICKED VERSIONS ****************
[versions]
*************** /PICKED VERSIONS ***************
Next, I edited bin/buildout and added the following lines:
import os
print os.environ["HTTP_PROXY"]
I ran bin/buildout again.
Sure enough, it spat out
proxyserveraddress:3128
That means that python is reading in environment variables.
I went a step further (and this where it gets interesting) and unset the proxy setting (just to see if it would matter):
MacBook-Pro:zinstance macpro$export HTTP_PROXY=
MacBook-Pro:zinstance macpro$ bin/buildout
Installing instance.
Download error on http://dist.plone.org: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://download.zope.org/ppix/: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://effbot.org/downloads: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://dist.plone.org/release/4.3.2: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection refused -- Some packages may not be found!
Couldn't find index page for 'plone.app.ldap' (maybe misspelled?)
Download error on http://pypi.python.org/simple/: [Errno 61] Connection refused -- Some packages may not be found!
Getting distribution for 'plone.app.ldap'.
While:
Installing instance.
Getting distribution for 'plone.app.ldap'.
Error: Couldn't find a distribution for 'plone.app.ldap'.
*************** PICKED VERSIONS ****************
[versions]
*************** /PICKED VERSIONS ***************
So, you unset the proxy and other servers (plone, zope, effbot) start complaining. That means that my proxy settings were working fine for those downloads but in some God-I-wish-knew-why way, they are not good enough for pypi.python.org.
What is so special about pypi.python.org? Does it use some special port for connecting (unlike the other servers contacted by buildout) that may be shut off by the network proxy server?? Before anyone asks, yes, I can browse to the pypi.python.org URL fine using Chrome browser.
I have established that I have a sensible proxy setting. Its pypi that is messing up buildout.
It is possible that the secured socket authentication used by pypi is causing your problems as it probably uses a different port that you are not including in your proxy forwarding list. You may be able to resolve this in the same manner as your other poxy settings.
Another way round would be to manually download and install the required packages from pypi before running the build - if the dependencies are already satisfied they the access will not be used.
You could also consider running a local pypi server and directing to that - you would still need to download to that server the packages but if you are doing multiple installations it would be worth it.