pip does not work

Hello!

pip -V 

> pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)

sudo pip install --upgrade virtualenv

> Downloading/unpacking virtualenv

Cannot fetch index base URL https://pypi.python.org/simple/

Could not find any downloads that satisfy the requirement virtualenv

Cleaning up…

No distributions at all found for virtualenv

Storing debug log for failure in /root/.pip/pip.log

sudo pip install django

> Downloading/unpacking django

Cannot fetch index base URL https://pypi.python.org/simple/

Could not find any downloads that satisfy the requirement django

Cleaning up…

No distributions at all found for django

Storing debug log for failure in /root/.pip/pip.log

On the local machine pip works. On linode not working. What's the matter?

10 Replies

That is an incredibly ancient pip. Your best bet would be to uninstall the system package, and install it via pip's own instructions: https://pip.pypa.io/en/stable/installing/ Note that you should run the install as the root user.

alas (

python get-pip.py

> Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(vendor.requests.packages.urllib3.connection.verifiedhttpsconnection object="" at="" 0x7f9d7ac582d0="">, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pip/vendor.requests.packages.urllib3.connection.verifiedhttpsconnection>
Previously, there was a version 8 pip - and it had the same error

Paste the output of 'mtr -rwb pypi.python.org' here.

mtr -rwb pypi.python.org

> Start: Thu Feb 16 07:46:04 2017

HOST: debian Loss% Snt Last Avg Best Wrst StDev

1.|– 2a01:7e00::8678:acff:fe0d:8f41 0.0% 10 0.9 1.0 0.9 1.1 0.0

2.|-- 2a01:7e00:7777:2::1 10.0% 10 0.9 1.2 0.8 2.3 0.0

3.|-- unknown.r00.londen10.uk.bb.gin.ntt.net (2001:728:0:5000::ebd) 0.0% 10 1.2 1.3 1.2 1.4 0.0

4.|-- ae-13.r24.londen12.uk.bb.gin.ntt.net (2001:728:0:2000::6a) 0.0% 10 0.8 1.0 0.7 2.1 0.3

5.|-- ae-1.r04.londen05.uk.bb.gin.ntt.net (2001:728:0:2000::5e) 0.0% 10 1.2 1.3 1.1 2.2 0.0

6.|-- ae-5.r03.londen05.uk.bb.gin.ntt.net (2001:728:0:2000::115) 0.0% 10 1.5 1.4 1.2 1.7 0.0

7.|-- 2001:978:2:21::7c:2 0.0% 10 1.1 1.1 1.0 1.3 0.0

8.|-- 2a04:4e42:4::223 0.0% 10 0.9 1.0 0.9 1.6 0.0

That's odd. Try 'mtr -4rwb pypi.python.org'

mtr -4rwb pypi.python.org

> Start: Thu Feb 16 07:54:44 2017

HOST: debian Loss% Snt Last Avg Best Wrst StDev

1.|– router1-lon.linode.com (212.111.33.229) 0.0% 10 0.6 0.8 0.6 1.8 0.0

2.|-- switch-lonr1.linode.com (109.74.207.4) 0.0% 10 1.0 0.8 0.7 1.0 0.0

3.|-- rpc2-lon1.linode.com (109.74.207.8) 0.0% 10 0.9 1.1 0.7 2.1 0.5

4.|-- ip81-60.fastly-gw2.lonap.net (5.57.81.60) 0.0% 10 1.1 0.9 0.8 1.3 0.0

5.|-- 151.101.16.223

Hmpf. Let's try these:

tcptraceroute pypi.python.org 443
tcptraceroute6 pypi.python.org 443

Put the results in a code block, instead of a quote block, so phpBB won't replace letters with smilies

````
tcptraceroute pypi.python.org 443

traceroute to pypi.python.org (151.101.16.223), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *

````

That explains a lot. Paste the output of 'iptables-save' (this one has to be run as root, and will not error if it is not (annoyingly)).

````
iptables-save


Generated by iptables-save v1.4.21 on Thu Feb 16 08:37:44 2017

*security
:INPUT ACCEPT [11294:2634117]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [11244:1402248]
COMMIT

Completed on Thu Feb 16 08:37:44 2017

Generated by iptables-save v1.4.21 on Thu Feb 16 08:37:44 2017

*raw
:PREROUTING ACCEPT [11307:2638329]
:OUTPUT ACCEPT [11251:1403048]
COMMIT

Completed on Thu Feb 16 08:37:44 2017

Generated by iptables-save v1.4.21 on Thu Feb 16 08:37:44 2017

*nat
:PREROUTING ACCEPT [2489:140268]
:INPUT ACCEPT [2476:136056]
:OUTPUT ACCEPT [875:69751]
:POSTROUTING ACCEPT [875:69751]
COMMIT

Completed on Thu Feb 16 08:37:44 2017

Generated by iptables-save v1.4.21 on Thu Feb 16 08:37:44 2017

*mangle
:PREROUTING ACCEPT [11307:2638329]
:INPUT ACCEPT [11294:2634117]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [11253:1403288]
:POSTROUTING ACCEPT [11253:1403288]
COMMIT

Completed on Thu Feb 16 08:37:44 2017

Generated by iptables-save v1.4.21 on Thu Feb 16 08:37:44 2017

*filter
:INPUT ACCEPT [11294:2634117]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [11253:1403288]
COMMIT

Completed on Thu Feb 16 08:37:44 2017

````

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct