Não é possível conectar-se para baixar pacotes

1

Estou com problemas para conseguir pacotes (picantes, estatísticas, etc)

Eu uso o python e preciso instalar novos pacotes, mas mesmo quando estou rodando no terminal, não consigo.

Ao tentar instalar o homebrew, recebi o seguinte erro.

curl: (6) Could not resolve host: raw.githubusercontent.com

E quando estou tentando ficar picante eu tenho o seguinte.

$ conda install spicy
Fetching package metadata: Could not connect to https://repo.continuum.io/pkgs/pro/noarch/
conda install spicy
Fetching package metadata: Could not connect to https://repo.continuum.io/pkgs/pro/noarch/
.Could not connect to https://repo.continuum.io/pkgs/pro/osx-64/
.Could not connect to https://repo.continuum.io/pkgs/free/noarch/
.Could not connect to https://repo.continuum.io/pkgs/free/osx-64/
.
Error: No packages found in current osx-64 channels matching: spicy

Did you mean one of these?

    spacy

You can search for this package on anaconda.org with

    anaconda search -t conda spicy

$ anaconda search -t conda spicy
Using anaconda-server api site https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
[ConnectionError] HTTPSConnectionPool(host='api.anaconda.org', port=443): Max retries exceeded with url: /search?type=conda&name=spicy (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x102f28c90>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)) 
Traceback (most recent call last):
  File "/Users/Carol/anaconda/bin/anaconda", line 6, in <module>
    sys.exit(main())
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/binstar_client/scripts/cli.py", line 93, in main
    description=__doc__, version=version)
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/binstar_client/scripts/cli.py", line 75, in binstar_main
    return args.main(args)
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/binstar_client/commands/search.py", line 14, in search
    packages = binstar.search(args.name, package_type=args.package_type)
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/binstar_client/__init__.py", line 443, in search
    res = self.session.get(url, params={'name':query, 'type':package_type})
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/requests/sessions.py", line 480, in get
    return self.request('GET', url, **kwargs)
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/Users/Carol/anaconda/lib/python2.7/site-packages/requests/adapters.py", line 423, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='api.anaconda.org', port=443): Max retries exceeded with url: /search?type=conda&name=spicy (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x102f28c90>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))



$ conda info
Current conda install:

             platform : osx-64
        conda version : 3.18.6
  conda-build version : 1.14.1
       python version : 2.7.10.final.0
     requests version : 2.8.1
     root environment : /Users/Carol/anaconda  (writable)
  default environment : /Users/Carol/anaconda
     envs directories : /Users/Carol/anaconda/envs
        package cache : /Users/Carol/anaconda/pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/osx-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/osx-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : None
    is foreign system : False

Alguma idéia?

estou usando Mac Pro (final de 2013) OS X El capitan 10.11.1

Python 2.7.10 |Anaconda 2.4.0 (x86_64)| (default, Oct 19 2015, 18:31:17) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
    
por Carol 13.01.2016 / 17:48

1 resposta

1

Parece um problema de DNS para mim. O fato de você poder navegar na Internet, mas é mais lento, possivelmente se deve ao fato de que você não está realmente abrindo essas páginas, mas obtendo uma cópia em cache do seu disco local.

Além disso, o código de retorno de curl , que é 6 , parece confirmar o problema de DNS:

6      Couldn't resolve host. The given remote host was not resolved.

Edite seu arquivo /etc/resolv.conf e coloque essas duas linhas em:

nameserver 8.8.8.8
nameserver 8.8.4.4

Esses IPs são servidores DNS do Google, que devem funcionar na maioria das máquinas. Então, a resolução de DNS deve funcionar.

    
por 13.01.2016 / 20:09