Como instalar o pip python sem conexão com a Internet?

2

Meu python é 2.7.5,

-bash-4.2$ python --version
Python 2.7.5

Por padrão, não tem pip python.

Meu Linux é Redhat ERHL 7.3.

-bash-4.2$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

Também verifiquei que não tenho python-pip no repositório do Linux.

-bash-4.2$ yum search python-pip
Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager
*Note* Spacewalk repositories are not listed below. You must run this command as root to access Spacewalk repositories.
cloudera-manager                                                                                                                 7/7
Warning: No matches found for: python-pip
No matches found

Minha maneira de instalar o pip está usando get-pip.py . Eu tenho o get-pip.py do link

O link de download é link

Eu baixei para o meu laptop Windows e ftp carregá-lo para o servidor Linux.

Quando eu corri python get-pip.py . Ele tentou uma conexão com a Internet.

-bash-4.2$ python get-pip.py
Collecting pip
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x35755d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x3575a90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/

Pergunta:

  • Onde se conecta?
  • Posso configurar um repositório privado?
  • É o pypo repo?
  • Posso usar o servidor web estático para este repositório pypi?
  • Como posso definir o get-pip.py para apontar a conexão para o meu repositório particular?
por cdhit 02.05.2017 / 05:44

0 respostas

Tags